当前位置: 首页>>代码示例>>PHP>>正文


PHP mysqlquery::gettotal方法代码示例

本文整理汇总了PHP中mysqlquery::gettotal方法的典型用法代码示例。如果您正苦于以下问题:PHP mysqlquery::gettotal方法的具体用法?PHP mysqlquery::gettotal怎么用?PHP mysqlquery::gettotal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mysqlquery的用法示例。


在下文中一共展示了mysqlquery::gettotal方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: printerror

    }
    if (empty($b)) {
        //操作日志
        insert_dolog("");
        printerror('ClearSearchAllSuccess', 'ClearSearchAll.php');
    }
    echo "<meta http-equiv=\"refresh\" content=\"0;url=ClearSearchAll.php?enews=ClearSearchAll&line={$line}&start={$newstart}\">" . $fun_r[OneClearSearchAllSuccess] . "(ID:<font color=red><b>" . $newstart . "</b></font>)";
    exit;
}
$enews = $_GET['enews'];
if ($enews) {
    include "../../data/dbcache/class.php";
    include "../" . LoadLang("pub/fun.php");
    ClearSearchAll($_GET[start], $_GET[line], $logininid, $loginin);
}
$total = $empire->gettotal("select count(*) as total from {$dbtbpre}enewssearchall");
db_close();
$empire = null;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>清理搜索多余数据</title>
<link href="../adminstyle/<?php 
echo $loginadminstyleid;
?>
/adminstyle.css" rel="stylesheet" type="text/css">
</head>

<body>
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:ClearSearchAll.php

示例2: elseif

    $r = $empire->fetch1("select onclick from {$dbtbpre}ecms_" . $cr['tbname'] . " where id='{$id}' limit 1");
    $shownum = $r['onclick'] + 1;
    if ($_GET['addclick'] == 1) {
        $usql = $empire->query("update {$dbtbpre}ecms_" . $cr['tbname'] . " set onclick=onclick+1 where id='{$id}' limit 1");
    }
} elseif ($down == 1) {
    $r = $empire->fetch1("select totaldown from {$dbtbpre}ecms_" . $cr['tbname'] . " where id='{$id}' limit 1");
    $shownum = $r['totaldown'];
} elseif ($down == 2) {
    if ($cr['checkpl']) {
        $r = $empire->fetch1("select restb from {$dbtbpre}ecms_" . $cr['tbname'] . " where id='{$id}' limit 1");
        if (!$r['restb']) {
            exit;
        }
        $pubid = ReturnInfoPubid(0, $id, $cr['tid']);
        $shownum = $empire->gettotal("select count(*) as total from {$dbtbpre}enewspl_" . $r['restb'] . " where pubid='{$pubid}' and checked=0");
    } else {
        $r = $empire->fetch1("select plnum from {$dbtbpre}ecms_" . $cr['tbname'] . " where id='{$id}' limit 1");
        $shownum = $r['plnum'];
    }
} elseif ($down == 3) {
    $r = $empire->fetch1("select infopfen,infopfennum from {$dbtbpre}ecms_" . $cr['tbname'] . " where id='{$id}' limit 1");
    $shownum = $r[infopfennum] ? round($r[infopfen] / $r[infopfennum]) : 0;
} elseif ($down == 4) {
    $r = $empire->fetch1("select infopfennum from {$dbtbpre}ecms_" . $cr['tbname'] . " where id='{$id}' limit 1");
    $shownum = $r['infopfennum'];
} elseif ($down == 5) {
    $r = $empire->fetch1("select diggtop from {$dbtbpre}ecms_" . $cr['tbname'] . " where id='{$id}' limit 1");
    $shownum = $r['diggtop'];
} elseif ($down == 6) {
    $r = $empire->fetch1("select diggdown from {$dbtbpre}ecms_" . $cr['tbname'] . " where id='{$id}' limit 1");
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:index.php

示例3: RepPostVar

$s_tbname = RepPostVar($_POST['tbname']);
$s_tempid = (int) $_POST['tempid'];
$trueclassid = 0;
if ($classid) {
    if (strstr($classid, ",")) {
        $son_r = sys_ReturnMoreClass($classid, 1);
        $trueclassid = $son_r[0];
        $add .= ' and (' . $son_r[1] . ')';
    } else {
        $trueclassid = intval($classid);
        $add .= $class_r[$trueclassid][islast] ? " and classid='{$trueclassid}'" : " and " . ReturnClass($class_r[$trueclassid][sonclass]);
    }
    $tbname = $class_r[$trueclassid][tbname];
    $modid = $class_r[$trueclassid][modid];
} elseif ($s_tbname) {
    $tbnamenum = $empire->gettotal("select count(*) as total from {$dbtbpre}enewstable where tbname='{$s_tbname}' limit 1");
    if (!$tbnamenum) {
        Header("Location:result/?searchid=0" . $dogetvar);
        exit;
    }
    $tbname = $s_tbname;
    //模型id
    $thestemp_r = $empire->fetch1("select modid from " . GetTemptb("enewssearchtemp") . " where tempid='{$s_tempid}'");
    if (empty($thestemp_r['modid'])) {
        Header("Location:result/?searchid=0" . $dogetvar);
        exit;
    }
    $modid = $thestemp_r['modid'];
} else {
    $tbname = $public_r['tbname'];
    $modid = 0;
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:index.php

示例4: explode

  <?php 
$dr = explode('-', $date);
$dr[0] = (int) $dr[0];
$dr[1] = (int) $dr[1];
for ($j = 1; $j <= 31; $j++) {
    //检测日期合法性
    if (!checkdate($dr[1], $j, $dr[0])) {
        continue;
    }
    $d = $j;
    if ($j < 10) {
        $d = '0' . $j;
    }
    $thisday = $date . '-' . $d;
    //发布数
    $totalnum = $empire->gettotal("select count(*) as total from {$dbtbpre}ecms_" . $tbname . " where userid='{$userid}' and ismember=0 and truetime>=" . to_time($thisday . " 00:00:00") . " and truetime<=" . to_time($thisday . " 23:59:59"));
    //未审核数
    $totalchecknum = $empire->gettotal("select count(*) as total from {$dbtbpre}ecms_" . $tbname . "_check where userid='{$userid}' and ismember=0 and truetime>=" . to_time($thisday . " 00:00:00") . " and truetime<=" . to_time($thisday . " 23:59:59"));
    ?>
  <tr bgcolor="#FFFFFF"> 
    <td height="25"><div align="center">
        <?php 
    echo $thisday;
    ?>
      </div></td>
    <td height="25"><div align="center">
        <?php 
    echo $totalnum + $totalchecknum;
    ?>
      </div></td>
    <td><div align="center"><?php 
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:MoreUserTotal.php

示例5: intval

//模型
$mid = intval($_GET['mid']);
if (!$mid) {
    printerror("ErrorUrl", "", 1);
}
$mr = $empire->fetch1("select tbname,qmname,sonclass from {$dbtbpre}enewsmod where mid='{$mid}'");
if (!$mr['tbname']) {
    printerror("ErrorUrl", "", 1);
}
$yhid = $etable_r[$mr[tbname]][yhid];
$search .= "&userid={$userid}&mid={$mid}";
//用户
$add = "userid='{$userid}'";
//显示方式
if ($public_r['qlistinfomod']) {
    $modnum = $empire->gettotal("select count(*) as total from {$dbtbpre}enewsmod where tbname='{$mr['tbname']}'");
    if ($modnum > 1) {
        $add .= ' and (' . ReturnClass($mr['sonclass']) . ')';
    }
}
//栏目
$classid = intval($_GET['classid']);
if ($classid) {
    if ($class_r[$classid][islast]) {
        $add .= " and classid='{$classid}'";
    } else {
        $add .= ' and ' . ReturnClass($class_r[$classid][sonclass]);
    }
    $yhid = $class_r[$classid][yhid];
    $search .= "&classid={$classid}";
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:list.php

示例6: elseif

    Moreport_ReDtPageAll($_GET, $logininid, $loginin);
} elseif ($enews == "MoreportClearTmpfileAll") {
    Moreport_ClearTmpfileAll($_GET, $logininid, $loginin);
} elseif ($enews == "MoreportReIndexfileAll") {
    Moreport_ReIndexfileAll($_GET, $logininid, $loginin);
}
$search = $ecms_hashur['ehref'];
$page = (int) $_GET['page'];
$page = RepPIntvar($page);
$start = 0;
$line = 30;
$page_line = 25;
$add = "";
$offset = $line * $page;
$totalquery = "select count(*) as total from {$dbtbpre}enewsmoreport";
$num = $empire->gettotal($totalquery);
$query = "select * from {$dbtbpre}enewsmoreport";
$query .= " order by pid limit {$offset},{$line}";
$sql = $empire->query($query);
$returnpage = page2($num, $line, $page_line, $start, $page, $search);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>管理网站访问端</title>
<link href="../adminstyle/<?php 
echo $loginadminstyleid;
?>
/adminstyle.css" rel="stylesheet" type="text/css">
<script>
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:ListMoreport.php

示例7: count

  </tr>
	  <?php 
$j = 0;
$alltbpls = 0;
$count = count($tr) - 1;
for ($i = 1; $i < $count; $i++) {
    $j++;
    $bgcolor = '#FFFFFF';
    if ($j % 2 == 0) {
        $bgcolor = '';
    }
    $thistb = $tr[$i];
    $restbname = "评论表" . $thistb;
    $pltbname = 'enewspl_' . $thistb;
    $alltbpls = eGetTableRowNum($dbtbpre . $pltbname);
    $checktbpls = $empire->gettotal("select count(*) as total from " . $dbtbpre . $pltbname . " where checked=1");
    $tbpls = $alltbpls - $checktbpls;
    if ($thistb == $plr['pldeftb']) {
        $restbname = '<b>' . $restbname . '</b>';
    }
    $exp = '|' . $thistb . ',';
    $addnumr = explode($exp, $pur['lastnumpltb']);
    $addnumrt = explode('|', $addnumr[1]);
    $addnum = (int) $addnumrt[0];
    $totalalltbpls += $alltbpls;
    $totalchecktbpls += $checktbpls;
    $totaltbpls += $tbpls;
    ?>
  <tr bgcolor="<?php 
    echo $bgcolor;
    ?>
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:PlMain.php

示例8: count

if ($onclick) {
    $selectf .= $dh . 'onclick';
    $dh = ',';
    $f[] = 'onclick';
    $divname[] = 'onclick';
}
if ($down) {
    $selectf .= $dh . 'totaldown';
    $dh = ',';
    $f[] = 'totaldown';
    $divname[] = 'down';
}
$pl = 0;
if ($plnum) {
    if ($cr['checkpl']) {
        $pl = $empire->gettotal("select count(*) as total from {$dbtbpre}enewspl where id='{$id}' and classid='{$classid}' and checked=0");
    } else {
        $selectf .= $dh . 'plnum';
        $dh = ',';
    }
    $f[] = 'plnum';
    $divname[] = 'plnum';
}
if ($pfen) {
    $selectf .= $dh . 'infopfen,infopfennum';
    $dh = ',';
    $f[] = 'avepfen';
    $divname[] = 'pfen';
}
if ($pfennum) {
    if (!$pfen) {
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:ViewMore.php

示例9: in

	$start=0;
	$page=(int)$_POST['page'];
	$page=RepPIntvar($page);
	$line=(int)$_POST['pline'];//每行显示
	$page_line=12;
	$offset=$page*$line;
	$addsql='';
	if($ecms_config['db']['dbver']>=4.1)
	{
		$addsql=" and id not in (select id from {$dbtbpre}enewsztinfo where ztid='$ztid' and mid in (".eGetTableModids(0,$re[2])."))";
	}
	$query="select id,title,ismember,username,plnum,isqf,classid,totaldown,onclick,newstime,isurl,titleurl,titlepic,havehtml,truetime,lastdotime,istop,isgood,firsttitle from {$dbtbpre}ecms_".$re[2]." where ".$re[0].$addsql;
	$totalquery="select count(*) as total from {$dbtbpre}ecms_".$re[2]." where ".$re[0].$addsql;
	if($totalnum<1)
	{
		$num=$empire->gettotal($totalquery);//取得总条数
	}
	else
	{
		$num=$totalnum;
	}
	$query.=" order by newstime desc limit $offset,$line";
	$sql=$empire->query($query);
	//专题子类
	$zcurl='';
	$zcid=(int)$_POST['zcid'];
	if($zcid)
	{
		$zcr=$empire->fetch1("select cname from {$dbtbpre}enewszttype where cid='$zcid'");
		$zcurl='&nbsp;->&nbsp;<b>'.$zcr[cname].'</b>';
	}
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:TogZt.php

示例10: count

  </tr>
</table>
<br>
<table width="800" border="0" cellpadding="3" cellspacing="1" class="tableborder">
  <tr class="header">
    <td width="7%"><div align="center">ID</div></td> 
    <td width="32%"><div align="center">接口名称</div></td>
    <td width="10%"><div align="center">状态</div></td>
    <td width="17%" height="25"><div align="center">接口类型</div></td>
    <td width="10%"><div align="center">绑定人数</div></td>
    <td width="10%"><div align="center">登录次数</div></td>
    <td width="14%" height="25"><div align="center">操作</div></td>
  </tr>
  <?php 
while ($r = $empire->fetch($sql)) {
    $membernum = $empire->gettotal("select count(*) as total from {$dbtbpre}enewsmember_connect where apptype='{$r['apptype']}' limit 1");
    $loginnum = $empire->gettotal("select sum(loginnum) as total from {$dbtbpre}enewsmember_connect where apptype='{$r['apptype']}' limit 1");
    ?>
  <tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor='#ffffff'" onmouseover="this.style.backgroundColor='#C3EFFF'">
    <td align="center"><?php 
    echo $r['id'];
    ?>
</td> 
    <td height="38" align="center"> 
      <?php 
    echo $r['appname'];
    ?>
    </td>
    <td><div align="center">
        <?php 
    echo $r['isclose'] == 0 ? '开启' : '关闭';
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:MemberConnect.php

示例11: ehtmlspecialchars

    </tr>
    <tr> 
      <td height="25" bgcolor="#FFFFFF">页面内容<font color="#666666">(支持标签同封面模板)</font></td>
      <td height="25" bgcolor="#FFFFFF">请将内容<a href="#ecms" onclick="window.clipboardData.setData('Text',document.form1.classtext.value);document.form1.classtext.select()" title="点击复制模板内容"><strong>复制到Dreamweaver(推荐)</strong></a>或者使用<a href="#ecms" onclick="window.open('../template/editor.php?<?php 
echo $ecms_hashur['ehref'];
?>
&getvar=opener.document.form1.classtext.value&returnvar=opener.document.form1.classtext.value&fun=ReturnHtml','editclasstext','width=880,height=600,scrollbars=auto,resizable=yes');"><strong>模板在线编辑</strong></a>进行可视化编辑</td>
    </tr>
    <tr> 
      <td height="25" colspan="2" bgcolor="#FFFFFF"> <textarea name="classtext" cols="80" rows="23" id="classtext" style="WIDTH: 100%"><?php 
echo ehtmlspecialchars(stripSlashes($addr[classtext]));
?>
</textarea></td>
    </tr>
    <?php 
$ztfnum = $empire->gettotal("select count(*) as total from {$dbtbpre}enewsztf");
if ($ztfnum) {
    $editorfnum = $empire->gettotal("select count(*) as total from {$dbtbpre}enewsztf where fform='editor' limit 1");
    if ($editorfnum) {
        include '../ecmseditor/infoeditor/fckeditor.php';
    }
    ?>
    <tr> 
      <td height="25" colspan="2">自定义字段设置</td>
    </tr>
    <?php 
    @(include '../../data/html/ztaddform.php');
    ?>
    <tr bgcolor="#FFFFFF"> 
      <td height="30" colspan="2"><strong>专题自定义字段调用说明</strong><br>
        内置调用专题自定义字段函数:ReturnZtAddField(专题ID,字段名),专题ID=0为当前专题ID。取多个字段内容可用逗号隔开,例子:<br>
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:AddZt.php

示例12: mysqlquery

$link = db_connect();
$empire = new mysqlquery();
//验证用户
$lur = is_login();
$logininid = (int) $lur['userid'];
$loginin = $lur['username'];
$loginrnd = $lur['rnd'];
$loginlevel = (int) $lur['groupid'];
$loginadminstyleid = $lur['adminstyleid'];
//ehash
$ecms_hashur = hReturnEcmsHashStrAll();
//我的状态
$user_r = $empire->fetch1("select pretime,preip,loginnum,preipport from {$dbtbpre}enewsuser where userid='{$logininid}'");
$gr = $empire->fetch1("select groupname from {$dbtbpre}enewsgroup where groupid='{$loginlevel}'");
//管理员统计
$adminnum = $empire->gettotal("select count(*) as total from {$dbtbpre}enewsuser");
$date = date("Y-m-d");
$noplnum = $empire->gettotal("select count(*) as total from {$dbtbpre}enewspl_" . $public_r['pldeftb'] . " where checked=1");
//未审核会员
$nomembernum = $empire->gettotal("select count(*) as total from " . eReturnMemberTable() . " where " . egetmf('checked') . "=0");
//过期广告
$outtimeadnum = $empire->gettotal("select count(*) as total from {$dbtbpre}enewsad where endtime<'{$date}' and endtime<>'0000-00-00'");
//系统信息
if (function_exists('ini_get')) {
    $onoff = ini_get('register_globals');
} else {
    $onoff = get_cfg_var('register_globals');
}
if ($onoff) {
    $onoff = "打开";
} else {
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:main.php

示例13: printerror

$htb = 0;
$tbsql = $empire->query("select tbname,tname from {$dbtbpre}enewstable order by tid");
while ($tbr = $empire->fetch($tbsql)) {
    $select = "";
    if ($tbr[tbname] == $tbname) {
        $htb = 1;
        $select = " selected";
    }
    $tbstr .= "<option value='" . $tbr[tbname] . "'" . $select . ">" . $tbr[tname] . "</option>";
}
if ($totaltype == 1 && $htb == 0) {
    printerror('ErrorUrl', '');
}
if ($classid || $ztid || $tbname) {
    //审核
    $checknum = $empire->gettotal($query1);
    //未审核
    $nochecknum = $empire->gettotal($query);
    //总信息数
    $allnum = $checknum + $nochecknum;
    //点击率
    $onclick = $empire->gettotal($onclickquery);
}
//栏目
$fcfile = "../data/fc/ListEnews.php";
$class = "<script src=../data/fc/cmsclass.js></script>";
if (!file_exists($fcfile)) {
    $class = ShowClass_AddClass("", $classid, 0, "|-", 0, 0);
}
//专题统计
$ztsql = $empire->query("select ztid,ztname from {$dbtbpre}enewszt order by ztid");
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:TotalData.php

示例14: define

//权限
if ($r['groupid'] || $class_r[$classid]['cgtoinfo']) {
    include '../data/dbcache/MemberLevel.php';
    define('empirecms', 'wm_chief');
    define('PageCheckLevel', 'wm_chief');
    $check_tbname = $tbname;
    $check_infoid = $id;
    $check_classid = $classid;
    $check_path = "../../";
    $checkinfor = $r;
    include "../class/CheckLevel.php";
}
//使用模板
if ($_GET['tempid']) {
    $tempid = (int) $_GET['tempid'];
    $tempnum = $empire->gettotal("select count(*) as total from " . GetTemptb("enewsprinttemp") . " where tempid='{$tempid}'");
    $tempid = $tempnum ? $tempid : $public_r['defprinttempid'];
} else {
    $mod_tempr = $empire->fetch1("select printtempid from {$dbtbpre}enewsmod where mid='{$mid}'");
    $tempid = $mod_tempr[printtempid] ? $mod_tempr[printtempid] : $public_r['defprinttempid'];
}
if (empty($tempid)) {
    $tempid = 1;
}
//存文本
$savetxtf = $emod_r[$mid]['savetxtf'];
if ($savetxtf && $r[$savetxtf]) {
    $r[$savetxtf] = GetTxtFieldText($r[$savetxtf]);
}
//分页字段
$pagef = $emod_r[$mid]['pagef'];
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:index.php

示例15: mysqlquery

require "../class/functions.php";
require "../class/user.php";
$link = db_connect();
$empire = new mysqlquery();
//验证用户
$lur = is_login();
$logininid = (int) $lur['userid'];
$loginin = $lur['username'];
$loginrnd = $lur['rnd'];
$loginlevel = (int) $lur['groupid'];
$loginadminstyleid = $lur['adminstyleid'];
//我的状态
$user_r = $empire->fetch1("select pretime,preip,loginnum from {$dbtbpre}enewsuser where userid='{$logininid}'");
$gr = $empire->fetch1("select groupname from {$dbtbpre}enewsgroup where groupid='{$loginlevel}'");
//管理员统计
$adminnum = $empire->gettotal("select count(*) as total from {$dbtbpre}enewsuser");
$date = date("Y-m-d");
$noplnum = $empire->gettotal("select count(*) as total from {$dbtbpre}enewspl where checked=1");
//未审核会员
$nomembernum = $empire->gettotal("select count(*) as total from " . $user_tablename . " where " . $user_checked . "=0");
//过期广告
$outtimeadnum = $empire->gettotal("select count(*) as total from {$dbtbpre}enewsad where endtime<'{$date}'");
//系统信息
if (function_exists('ini_get')) {
    $onoff = ini_get('register_globals');
} else {
    $onoff = get_cfg_var('register_globals');
}
if ($onoff) {
    $onoff = "打开";
} else {
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:main.php


注:本文中的mysqlquery::gettotal方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。