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


PHP mysqlquery::fetch方法代码示例

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


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

示例1: substr

    $username = substr($r[username], 1, -1);
}
//修改
if ($enews == "EditSp") {
    $r = $empire->fetch1("select * from {$dbtbpre}enewssp where spid='{$spid}'");
    $postword = '修改碎片';
    $noteditword = '';
    $disabled = ' disabled';
    $sptypehidden = '<input type="hidden" name="sptype" value="' . $r[sptype] . '">';
    $url = "<a href=ListSp.php" . $ecms_hashur['whehref'] . ">管理碎片</a> &gt; 修改碎片:<b>" . $r[spname] . "</b>";
    $username = substr($r[username], 1, -1);
}
//标签模板
$bqtemp = '';
$bqtempsql = $empire->query("select tempid,tempname from " . GetTemptb("enewsbqtemp") . " order by tempid");
while ($bqtempr = $empire->fetch($bqtempsql)) {
    $select = "";
    if ($r[tempid] == $bqtempr[tempid]) {
        $select = " selected";
    }
    $bqtemp .= "<option value='" . $bqtempr[tempid] . "'" . $select . ">" . $bqtempr[tempname] . "</option>";
}
//栏目
$options = ShowClass_AddClass("", $r[classid], 0, "|-", 0, 0);
//分类
$scstr = '';
$scsql = $empire->query("select classid,classname from {$dbtbpre}enewsspclass order by classid");
while ($scr = $empire->fetch($scsql)) {
    $select = "";
    if ($scr[classid] == $r[cid]) {
        $select = " selected";
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:AddSp.php

示例2: egetmf

    if ($schecked == 1) {
        $add .= $and . egetmf('checked') . "=0";
    } else {
        $add .= $and . egetmf('checked') . "=1";
    }
    $search .= "&schecked={$schecked}";
}
$totalquery = "select count(*) as total from " . eReturnMemberTable() . $add;
$num = $empire->gettotal($totalquery);
$query = "select " . eReturnSelectMemberF('*') . " from " . eReturnMemberTable() . $add;
$query .= " order by " . egetmf('userid') . " desc limit {$offset},{$line}";
$sql = $empire->query($query);
$returnpage = page2($num, $line, $page_line, $start, $page, $search);
//----------会员组
$sql1 = $empire->query("select * from {$dbtbpre}enewsmembergroup order by level");
while ($l_r = $empire->fetch($sql1)) {
    if ($groupid == $l_r[groupid]) {
        $select = " selected";
    } else {
        $select = "";
    }
    $group .= "<option value=" . $l_r[groupid] . $select . ">" . $l_r[groupname] . "</option>";
}
?>
<!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;
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:ListMember.php

示例3: GetDoTemptb

$url = $urlgname . "<a href=ListJstemp.php?gid={$gid}>管理JS模板</a>&nbsp;>&nbsp;增加JS模板";
//复制
if ($enews == "AddJstemp" && $_GET['docopy']) {
    $tempid = (int) $_GET['tempid'];
    $r = $empire->fetch1("select * from " . GetDoTemptb("enewsjstemp", $gid) . " where tempid={$tempid}");
    $url = $urlgname . "<a href=ListJstemp.php?gid={$gid}>管理JS模板</a>&nbsp;>&nbsp;复制JS模板: " . $r[tempname];
}
//修改
if ($enews == "EditJstemp") {
    $tempid = (int) $_GET['tempid'];
    $r = $empire->fetch1("select * from " . GetDoTemptb("enewsjstemp", $gid) . " where tempid={$tempid}");
    $url = $urlgname . "<a href=ListJstemp.php?gid={$gid}>管理JS模板</a>&nbsp;>&nbsp;修改JS模板: " . $r[tempname];
}
//系统模型
$msql = $empire->query("select mid,mname from {$dbtbpre}enewsmod where usemod=0 order by myorder,mid");
while ($mr = $empire->fetch($msql)) {
    if ($mr[mid] == $r[modid]) {
        $select = " selected";
    } else {
        $select = "";
    }
    $mod .= "<option value=" . $mr[mid] . $select . ">" . $mr[mname] . "</option>";
}
//分类
$cstr = "";
$csql = $empire->query("select classid,classname from {$dbtbpre}enewsjstempclass order by classid");
while ($cr = $empire->fetch($csql)) {
    $select = "";
    if ($cr[classid] == $r[classid]) {
        $select = " selected";
    }
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:AddJstemp.php

示例4: while

    while ($r = $empire->fetch($sql)) {
        $classurl = sys_ReturnBqClassname($r, 9);
        $titleurl = sys_ReturnBqTitleLink($r);
        echo "<tr bgcolor='#ffffff' height='23'><td>[<a href='" . $classurl . "' target='_blank'>" . $class_r[$r[classid]][classname] . "</a>] <a href='{$titleurl}' target='_blank' title='发布时间:" . date("Y-m-d H:i:s", $r[newstime]) . "'>" . stripSlashes($r[title]) . "</a></td><td>" . $r[$field] . "</td></tr>";
    }
    echo "</table>";
}
$where = '';
//数据表
$tbname = RepPostVar($_GET['tbname']);
if (empty($tbname)) {
    $tbname = $public_r['tbname'];
}
$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";
    }
    $tbs .= "<option value='" . $tbr[tbname] . "'" . $select . ">" . $tbr[tname] . "</option>";
}
if ($htb == 0) {
    printerror('ErrorUrl', '');
}
//栏目
$classid = (int) $_GET['classid'];
if ($classid) {
    $and = $where ? ' and ' : ' where ';
    if ($class_r[$classid][islast]) {
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:infotop.php

示例5: hReturnEcmsHashStrAll

$ecms_hashur = hReturnEcmsHashStrAll();
//验证权限
CheckLevel($logininid, $loginin, $classid, "buygroup");
$enews = ehtmlspecialchars($_GET['enews']);
$r[gmoney] = 10;
$r[gfen] = 0;
$r[gdate] = 0;
$url = "<a href=ListBuyGroup.php" . $ecms_hashur['whehref'] . ">管理充值类型</a> &gt; 增加充值类型";
if ($enews == "EditBuyGroup") {
    $id = (int) $_GET['id'];
    $r = $empire->fetch1("select * from {$dbtbpre}enewsbuygroup where id='{$id}' limit 1");
    $url = "<a href=ListBuyGroup.php" . $ecms_hashur['whehref'] . ">管理充值类型</a> &gt; 修改充值类型";
}
//----------会员组
$sql = $empire->query("select groupid,groupname from {$dbtbpre}enewsmembergroup order by level");
while ($level_r = $empire->fetch($sql)) {
    if ($r[ggroupid] == $level_r[groupid]) {
        $select = " selected";
    } else {
        $select = "";
    }
    $group .= "<option value=" . $level_r[groupid] . $select . ">" . $level_r[groupname] . "</option>";
    if ($r[gzgroupid] == $level_r[groupid]) {
        $zselect = " selected";
    } else {
        $zselect = "";
    }
    $zgroup .= "<option value=" . $level_r[groupid] . $zselect . ">" . $level_r[groupname] . "</option>";
    if ($r[buygroupid] == $level_r[groupid]) {
        $bselect = " selected";
    } else {
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:AddBuyGroup.php

示例6: explode

    $r = $empire->fetch1("select * from {$dbtbpre}enewsmemberform where fid='{$fid}'");
    $url = "<a href='ListMemberForm.php'>管理会员表单</a>&nbsp;>&nbsp;复制会员表单: " . $r['fname'];
    $postword = '复制会员表单';
}
//修改
if ($enews == "EditMemberForm") {
    $fid = (int) $_GET['fid'];
    $ftype = "";
    $url = "<a href='ListMemberForm.php'>管理会员表单</a>&nbsp;>&nbsp;修改会员表单";
    $postword = '修改会员表单';
    $r = $empire->fetch1("select * from {$dbtbpre}enewsmemberform where fid='{$fid}'");
}
//取得字段
$no = 0;
$fsql = $empire->query("select f,fname from {$dbtbpre}enewsmemberf order by myorder,fid");
while ($fr = $empire->fetch($fsql)) {
    $no++;
    $bgcolor = "ffffff";
    if ($no % 2 == 0) {
        $bgcolor = "#F8F8F8";
    }
    $like = $field . $fr[f] . $record;
    $slike = "," . $fr[f] . ",";
    //录入项
    $enterchecked = "";
    if (strstr($r[enter], $like)) {
        $enterchecked = " checked";
        //取得字段标识
        $dor = explode($like, $r[enter]);
        if (strstr($dor[0], $record)) {
            $dor1 = explode($record, $dor[0]);
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:AddMemberForm.php

示例7: RepPostVar

$add = $_GET;
$havehtml = (int) $add['havehtml'];
$add[classid] = RepPostVar($add[classid]);
$add[from] = RepPostStrUrl($add[from]);
$add[retype] = RepPostStr($add[retype], 1);
$add[startday] = RepPostStr($add[startday], 1);
$add[endday] = RepPostStr($add[endday], 1);
$add[startid] = RepPostVar($add[startid]);
$add[endid] = RepPostVar($add[endid]);
$tbname = $add['tbname'];
$count = count($tbname);
//刷新所有表
if (!$count) {
    $j = 0;
    $tsql = $empire->query("select tbname from {$dbtbpre}enewstable where intb=0 order by tid");
    while ($tr = $empire->fetch($tsql)) {
        $tbname[$j] = $tr[tbname];
        $j++;
    }
    $count = count($tbname);
}
esetcookie("retablenum", $count, 0, 1);
esetcookie("rechecktablenum", 0, 0, 1);
$url = "../ecmschtml.php?enews=ReNewsHtml&classid={$add['classid']}&from=" . urlencode($add[from]) . "&retype={$add['retype']}&startday={$add['startday']}&endday={$add['endday']}&startid={$add['startid']}&endid={$add['endid']}&havehtml={$havehtml}&reallinfotime=" . time() . $ecms_hashur['href'];
echo "<link href='../adminstyle/" . $loginadminstyleid . "/adminstyle.css' rel='stylesheet' type='text/css'><center>要刷新的表的总个数为:<font color=red>{$count}</font>个</center><br>";
for ($i = 0; $i < $count; $i++) {
    $tbname[$i] = RepPostVar($tbname[$i]);
    $trueurl = $url . "&tbname=" . $tbname[$i];
    echo "<table width='100%' border=0 align=center cellpadding=3 cellspacing=1 class=tableborder><tr class=header><td>刷新数据表:" . $tbname[$i] . "</td></tr><tr><td bgcolor='#ffffff'><iframe frameborder=0 height=35 id='" . $tbname[$i] . "' scrolling=no \n            src=\"" . $trueurl . "\" \n            width=\"100%\"></iframe></td></tr></table>";
}
db_close();
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:DoRehtml.php

示例8: mysqlquery

<?php

require "../class/connect.php";
require "../class/db_sql.php";
require "../class/q_functions.php";
require "../class/user.php";
eCheckCloseMods('pay');
//关闭模块
$link = db_connect();
$empire = new mysqlquery();
//是否登陆
$user = islogin();
$pr = $empire->fetch1("select paymoneytofen,payminmoney from {$dbtbpre}enewspublic limit 1");
$paysql = $empire->query("select payid,paytype,payfee,paysay,payname from {$dbtbpre}enewspayapi where isclose=0 order by myorder,payid");
$pays = '';
while ($payr = $empire->fetch($paysql)) {
    $pays .= "<option value='" . $payr[payid] . "'>" . $payr[payname] . "</option>";
}
//导入模板
require ECMS_PATH . 'e/template/payapi/payapi.php';
db_close();
$empire = null;
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:22,代码来源:index.php

示例9: RepPostVar

//验证权限
CheckLevel($logininid, $loginin, $classid, "totaldata");
$userid = (int) $_GET['userid'];
$username = RepPostVar($_GET['username']);
$tbname = RepPostVar($_GET['tbname']);
if (empty($tbname)) {
    $tbname = $public_r['tbname'];
}
if (!$userid || !$username || !$tbname) {
    printerror('ErrorUrl', '');
}
//数据表
$b = 0;
$htb = 0;
$tbsql = $empire->query("select tbname,tname from {$dbtbpre}enewstable order by tid");
while ($tbr = $empire->fetch($tbsql)) {
    $b = 1;
    $select = "";
    if ($tbr[tbname] == $tbname) {
        $htb = 1;
        $select = " selected";
    }
    $tbstr .= "<option value='" . $tbr[tbname] . "'" . $select . ">" . $tbr[tname] . "</option>";
}
if ($b == 0) {
    printerror('ErrorUrl', '');
}
if ($htb == 0) {
    printerror('ErrorUrl', '');
}
//日期
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:MoreUserTotal.php

示例10: urlencode

        $doorder = "id desc";
    } else {
        $doorder = $thisclassr[listorder];
    }
}
$search .= "&totalnum={$num}";
$search1 = $search;
$search .= "&myorder={$myorder}";
$returnpage = page2($num, $line, $page_line, $start, $page, $search);
$phpmyself = urlencode($_SERVER['PHP_SELF'] . "?" . $_SERVER["QUERY_STRING"]);
//取得专题
$ztclass = "";
$doztclass = "";
$ztwhere = ReturnClass($class_r[$classid][featherclass]);
$z_sql = $empire->query("select ztname,ztid,tbname from {$dbtbpre}enewszt where usezt=0 and (classid=0 or classid='{$classid}' or (" . $ztwhere . "))");
while ($z_r = $empire->fetch($z_sql)) {
    /*
    //不同表
    if($class_r[$classid][tbname]!=$z_r[tbname])
    {continue;}
    */
    $selected = "";
    if ($z_r[ztid] == $ztid) {
        $selected = " selected";
    }
    $ztclass .= "<option value='" . $z_r[ztid] . "'" . $selected . ">" . $z_r[ztname] . "</option>";
    $doztclass .= "<option value='" . $z_r[ztid] . "'>" . $z_r[ztname] . "</option>";
}
//标题分类
$tts = '';
$ttsql = $empire->query("select typeid,tname from {$dbtbpre}enewsinfotype where mid='{$modid}' order by myorder");
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:ListInfoDoc.php

示例11: GetTemptb

$r[jssql] = "select * from [!db.pre!]ecms_news where checked=1 order by id limit 10";
//复制
if ($enews == "AddUserjs" && $_GET['docopy']) {
    $jsid = (int) $_GET['jsid'];
    $r = $empire->fetch1("select * from {$dbtbpre}enewsuserjs where jsid='{$jsid}'");
    $url = "<a href=ListUserjs.php>管理用户自定义JS</a> &gt; 复制自定义JS:<b>" . $r[jsname] . "</b>";
}
//修改
if ($enews == "EditUserjs") {
    $jsid = (int) $_GET['jsid'];
    $r = $empire->fetch1("select * from {$dbtbpre}enewsuserjs where jsid='{$jsid}'");
    $url = "<a href=ListUserjs.php>管理用户自定义JS</a> -&gt; 修改自定义JS:<b>" . $r[jsname] . "</b>";
}
//js模板
$jstempsql = $empire->query("select tempid,tempname from " . GetTemptb("enewsjstemp") . " order by tempid");
while ($jstempr = $empire->fetch($jstempsql)) {
    $select = "";
    if ($r[jstempid] == $jstempr[tempid]) {
        $select = " selected";
    }
    $jstemp .= "<option value='" . $jstempr[tempid] . "'" . $select . ">" . $jstempr[tempname] . "</option>";
}
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">
<link href="../adminstyle/<?php 
echo $loginadminstyleid;
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:AddUserjs.php

示例12: while

          <tr>
            <td width="24%">操作类型:</td>
            <td width="76%"><select name="dotype" id="select">
			  <option value="6">专题最新信息</option>
			  <option value="7">专题点击排行</option>
			  <option value="8">专题推荐信息</option>
			  <option value="11">专题评论排行</option>
			  <option value="14">专题头条信息</option>
			  <option value="17">专题下载排行</option>
              </select></td>
          </tr>
        </table>';
    //选择专题
    $ztclass = '';
    $ztsql = $empire->query("select ztid,ztname from {$dbtbpre}enewszt order by ztid desc");
    while ($ztr = $empire->fetch($ztsql)) {
        $ztclass .= "<option value='" . $ztr['ztid'] . "'>" . $ztr['ztname'] . "</option>";
    }
    if ($addselfinfo == 1) {
    } else {
        $selfinfooption = '<option value="\'selfinfo\'">当前专题</option>';
    }
    $changeobject = '<table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="24%">选择专题:</td>
            <td width="76%"><select name="classid" id="select2">
			  ' . $selfinfooption . '
			  ' . $ztclass . '
              </select></td>
          </tr>
        </table>';
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:MakeBq.php

示例13: ehtmlspecialchars

$enews = ehtmlspecialchars($_GET['enews']);
$r['ppath'] = ReturnAbsEcmsPath();
$url = "<a href=ListMoreport.php" . $ecms_hashur['whehref'] . ">管理网站访问端</a> &gt; 增加网站访问端";
$postword = '增加网站访问端';
if ($enews == "EditMoreport") {
    $pid = (int) $_GET['pid'];
    if ($pid == 1) {
        printerror("ErrorUrl", "history.go(-1)");
    }
    $r = $empire->fetch1("select * from {$dbtbpre}enewsmoreport where pid='{$pid}' limit 1");
    $url = "<a href=ListMoreport.php" . $ecms_hashur['whehref'] . ">管理网站访问端</a> &gt; 修改网站访问端:<b>" . $r[pname] . "</b>";
    $postword = '修改网站访问端';
}
$tgtemps = '';
$tgsql = $empire->query("select gid,gname,isdefault from {$dbtbpre}enewstempgroup order by gid");
while ($tgr = $empire->fetch($tgsql)) {
    $selected = '';
    if ($tgr['gid'] == $r['tempgid']) {
        $selected = ' selected';
    }
    $tgtemps .= "<option value='" . $tgr['gid'] . "'" . $selected . ">" . $tgr['gname'] . "</option>";
}
?>
<!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;
?>
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:AddMoreport.php

示例14: printerror

    printerror("AddInfoErrorClassid", "history.go(-1)");
}
$bclassid = $class_r[$classid][bclassid];
$id = (int) $_GET['id'];
//附件验证码
if (!$doselfinfo['doeditinfo']) {
    printerror("NotEditInfoLevel", "EditInfoSimple.php?isclose=1" . $ecms_hashur['ehref']);
}
$filepass = $id;
$ecmsfirstpost = 0;
//模型
$modid = $class_r[$classid][modid];
$enter = $emod_r[$modid]['enter'];
//会员组
$sql1 = $empire->query("select groupid,groupname from {$dbtbpre}enewsmembergroup order by level");
while ($l_r = $empire->fetch($sql1)) {
    $ygroup .= "<option value=" . $l_r[groupid] . ">" . $l_r[groupname] . "</option>";
}
//初始化数据
$r = array();
$todaytime = date("Y-m-d H:i:s");
//-----------------------------------------修改信息
//索引表
$index_r = $empire->fetch1("select classid,id,checked from {$dbtbpre}ecms_" . $class_r[$classid][tbname] . "_index where id='{$id}' limit 1");
if (!$index_r['id'] || $index_r['classid'] != $classid) {
    printerror("ErrorUrl", "history.go(-1)");
}
//返回表
$infotb = ReturnInfoMainTbname($class_r[$classid][tbname], $index_r['checked']);
//主表
$r = $empire->fetch1("select * from " . $infotb . " where id='{$id}' limit 1");
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:EditInfoSimple.php

示例15: date

&id=<?php 
echo $pid;
?>
&enews=<?php 
echo $enews;
?>
&keyid='+keyid;
	//document.getElementById('doaddkey'+infoid).innerHTML='---';
}
</script>
</head>

<body>
<table width="100%" border="0" cellspacing="1" cellpadding="3" class="tableborder">
<?php 
while ($infor = $empire->fetch($sql)) {
    $titleurl = sys_ReturnBqTitleLink($infor);
    ?>
  <tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor='#ffffff'" onmouseover="this.style.backgroundColor='#C3EFFF'"> 
    <td width="11%" height="25"> 
      <div align="center"> 
        <?php 
    echo $infor['id'];
    ?>
      </div></td>
    <td width="75%"><a href="<?php 
    echo $titleurl;
    ?>
" target="_blank" title="发布时间:<?php 
    echo date('Y-m-d H:i:s', $infor['newstime']);
    ?>
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:31,代码来源:OtherLinkSearch.php


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