當前位置: 首頁>>代碼示例>>PHP>>正文


PHP mysqlquery::query方法代碼示例

本文整理匯總了PHP中mysqlquery::query方法的典型用法代碼示例。如果您正苦於以下問題:PHP mysqlquery::query方法的具體用法?PHP mysqlquery::query怎麽用?PHP mysqlquery::query使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在mysqlquery的用法示例。


在下文中一共展示了mysqlquery::query方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: CheckDoTask

//執行
if ($ecms == 'dotask') {
    $id = (int) $_GET['id'];
    if (empty($id)) {
        exit;
    }
    $r = $empire->fetch1("select id,filename,lastdo,doweek,doday,dohour,dominute,userid,taskname from {$dbtbpre}enewstask where id={$id} and isopen=1 limit 1");
    $file = '../tasks/' . $r['filename'];
    if (empty($r['id']) || empty($r['filename']) || !file_exists($file)) {
        exit;
    }
    $lasttime = CheckDoTask($r);
    if ($lasttime) {
        echo "<script>parent.WriteTaskLog('任務 <" . $r['taskname'] . "> 開始執行......');</script>";
        require_once $file;
        $usql = $empire->query("update {$dbtbpre}enewstask set lastdo='{$lasttime}' where id={$id}");
        echo "<script>parent.WriteTaskLog('任務 <" . $r['taskname'] . "> 執行完畢,最後執行時間:" . date("Y-m-d H:i:s", $lasttime) . "');</script>";
    }
} elseif ($ecms == 'retask') {
    echo "<meta http-equiv=\"refresh\" content=\"" . $retasktime . ";url=task.php?ecms=retask" . $ecms_hashur['href'] . "\">";
    ?>
	<script>
	function AddTaskDiv(divid,taskid){
		if(parent.document.getElementById(divid)!=null)
		{
			parent.document.getElementById('page'+divid).src='task.php?<?php 
    echo $ecms_hashur['href'];
    ?>
&ecms=dotask&id='+taskid;
		}
		else
開發者ID:novnan,項目名稱:meiju,代碼行數:31,代碼來源:task.php

示例2: count

}
//欄目
$classid = (int) $_GET['classid'];
if ($classid) {
    $add .= $and . "classid='{$classid}'";
    $search .= "&classid={$classid}";
}
if ($add) {
    $add = ' where ' . $add;
}
$query = "select spid,spname,varname,cid,classid,isclose,sptype,sptime from {$dbtbpre}enewssp" . $add;
$totalquery = "select count(*) as total from {$dbtbpre}enewssp" . $add;
$num = $empire->gettotal($totalquery);
//取得總條數
$query = $query . " order by spid desc limit {$offset},{$line}";
$sql = $empire->query($query);
$returnpage = page2($num, $line, $page_line, $start, $page, $search);
$url = "<a href=ListSp.php>管理碎片</a>";
//分類
$scstr = "";
$scsql = $empire->query("select classid,classname from {$dbtbpre}enewsspclass order by classid");
while ($scr = $empire->fetch($scsql)) {
    $select = "";
    if ($scr[classid] == $cid) {
        $select = " selected";
    }
    $scstr .= "<option value='" . $scr[classid] . "'" . $select . ">" . $scr[classname] . "</option>";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
開發者ID:BGCX261,項目名稱:zjh-dev-svn-to-git,代碼行數:31,代碼來源:ListSp.php

示例3: mysqlquery

require "../../class/functions.php";
$link = db_connect();
$empire = new mysqlquery();
$editor = 1;
//驗證用戶
$lur = is_login();
$logininid = $lur['userid'];
$loginin = $lur['username'];
$loginrnd = $lur['rnd'];
$loginlevel = $lur['groupid'];
$loginadminstyleid = $lur['adminstyleid'];
//ehash
$ecms_hashur = hReturnEcmsHashStrAll();
//驗證權限
CheckLevel($logininid, $loginin, $classid, "template");
$sql = $empire->query("select classid,classname from {$dbtbpre}enewsbqtempclass order by classid desc");
?>
<!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">
</head>

<body>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
開發者ID:novnan,項目名稱:meiju,代碼行數:31,代碼來源:BqtempClass.php

示例4: getcvar

require "class/connect.php";
include "class/config.php";
include "class/db_sql.php";
include "class/functions.php";
$loginin = getcvar('bakusername');
$rnd = getcvar('bakrnd');
islogin($loginin, $rnd);
$link = db_connect();
$empire = new mysqlquery();
$mydbname = RepPostVar($_GET['mydbname']);
if (empty($mydbname)) {
    printerror("NotChangeDb", "history.go(-1)");
}
//選擇數據庫
$udb = $empire->query("use `" . $mydbname . "`");
//存放目錄
$mypath = $mydbname . "_" . date("YmdHis");
if ($phpsafemod) {
    $mypath = "safemod";
}
//導入設置
$loadfile = RepPostVar($_GET['savefilename']);
if (strstr($loadfile, '.') || strstr($loadfile, '/') || strstr($loadfile, "\\")) {
    $loadfile = '';
}
if (empty($loadfile)) {
    $loadfile = 'def';
}
$loadfile = 'setsave/' . $loadfile;
@(include $loadfile);
開發者ID:laiello,項目名稱:netos-cms,代碼行數:30,代碼來源:ChangeTable.php

示例5: egetmf

//審核
$schecked = (int) $_GET['schecked'];
if ($schecked) {
    $and = $add ? ' and ' : ' where ';
    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>
開發者ID:novnan,項目名稱:meiju,代碼行數:31,代碼來源:ListMember.php

示例6:

        <input type="button" name="Submit5" value="增加會員組" onclick="self.location.href='AddMemberGroup.php?enews=AddMemberGroup';">
      </div></td>
  </tr>
</table>
<br>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  <tr class="header"> 
    <td width="6%" height="25"> <div align="center">ID</div></td>
    <td width="35%" height="25"> <div align="center">會員組名稱</div></td>
    <td width="11%"><div align="center">級別值</div></td>
    <td width="16%"><div align="center">發送短信息</div></td>
    <td width="14%"><div align="center">注冊地址</div></td>
    <td width="18%" height="25"> <div align="center">操作</div></td>
  </tr>
  <?php 
$sql = $empire->query("select * from {$dbtbpre}enewsmembergroup order by groupid");
while ($r = $empire->fetch($sql)) {
    ?>
  <tr bgcolor="#FFFFFF" onmouseout="this.style.backgroundColor='#ffffff'" onmouseover="this.style.backgroundColor='#C3EFFF'"> 
    <td height="25"> <div align="center"> 
        <?php 
    echo $r[groupid];
    ?>
      </div></td>
    <td height="25"> <div align="center"> 
        <?php 
    echo $r[groupname];
    ?>
      </div></td>
    <td><div align="center"> 
        <?php 
開發者ID:BGCX261,項目名稱:zjh-dev-svn-to-git,代碼行數:31,代碼來源:ListMemberGroup.php

示例7: printerror

    $ecmsfirstpost = 1;
} else {
    if (!$doselfinfo['doeditinfo']) {
        printerror("NotEditInfoLevel", "history.go(-1)");
    }
    $filepass = $id;
    $word = '修改信息';
    $ecmsfirstpost = 0;
}
//模型
$modid = $class_r[$classid][modid];
$enter = $emod_r[$modid]['enter'];
//導航
$url = AdminReturnClassLink($classid) . '&nbsp;>&nbsp;' . $word;
//會員組
$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>";
}
if ($enews == "AddNews") {
    $group = str_replace(" value=" . $class_r[$classid][groupid] . ">", " value=" . $class_r[$classid][groupid] . " selected>", $ygroup);
}
//初始化數據
$r = array();
$newstime = time();
$r[newstime] = date("Y-m-d H:i:s");
$todaytime = $r[newstime];
$r[checked] = $class_r[$classid][checked];
$r[newspath] = date($class_r[$classid][newspath]);
$r[onclick] = 0;
$r[userfen] = 0;
開發者ID:BGCX261,項目名稱:zjh-dev-svn-to-git,代碼行數:31,代碼來源:AddNews.php

示例8: CheckAll

}
$classid = (int) $_GET['classid'];
if (!$classid) {
    printerror("ErrorUrl", "history.go(-1)");
}
$cr = $empire->fetch1("select classid,bclassid,modid,classname,islast from {$dbtbpre}enewsclass where classid='{$classid}'");
if (!$cr['classid'] || !$cr['islast'] || !$cr['modid']) {
    printerror("ErrorUrl", "history.go(-1)");
}
$caddr = $empire->fetch1("select ttids from {$dbtbpre}enewsclassadd where classid='{$classid}'");
$url = $cr['classname'] . ' &gt; 設置標題分類';
if ($cr['bclassid']) {
    $bcr = $empire->fetch1("select classid,classname from {$dbtbpre}enewsclass where classid='{$cr['bclassid']}'");
    $url = $bcr['classname'] . ' &gt; ' . $url;
}
$sql = $empire->query("select typeid,tname from {$dbtbpre}enewsinfotype where mid='{$cr['modid']}' order by myorder,typeid");
?>
<!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>
function CheckAll(form)
  {
  	for (var i=0;i<form.elements.length;i++)
    {
開發者ID:novnan,項目名稱:meiju,代碼行數:31,代碼來源:ClassInfoType.php

示例9: hCheckEcmsRHash

    $enews = $_GET['enews'];
}
if ($enews) {
    hCheckEcmsRHash();
}
//增加前綴
if ($enews == "AddDownurl") {
    AddDownurl($_POST, $logininid, $loginin);
} elseif ($enews == "EditDownurl") {
    EditDownurl($_POST, $logininid, $loginin);
} elseif ($enews == "DelDownurl") {
    $urlid = $_GET['urlid'];
    DelDownurl($urlid, $logininid, $loginin);
} else {
}
$sql = $empire->query("select urlid,urlname,url,downtype from {$dbtbpre}enewsdownurlqz order by urlid desc");
?>
<!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">
</head>

<body>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr>
開發者ID:novnan,項目名稱:meiju,代碼行數:31,代碼來源:url.php

示例10: hReturnEcmsHashStrAll

$ecms_hashur = hReturnEcmsHashStrAll();
$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>";
}
開發者ID:novnan,項目名稱:meiju,代碼行數:31,代碼來源:DoRehtml.php

示例11: hReturnEcmsHashStrAll

$loginadminstyleid = $lur['adminstyleid'];
//ehash
$ecms_hashur = hReturnEcmsHashStrAll();
//驗證權限
CheckLevel($logininid, $loginin, $classid, "table");
$enews = RepPostStr($_GET['enews'], 1);
$url = "<a href=ListTable.php" . $ecms_hashur['whehref'] . ">管理數據表</a>&nbsp;>&nbsp;新建數據表";
//修改
if ($enews == "EditTable") {
    $tid = (int) $_GET['tid'];
    $url = "<a href=ListTable.php" . $ecms_hashur['whehref'] . ">管理數據表</a>&nbsp;>&nbsp;修改數據表";
    $r = $empire->fetch1("select tid,tbname,tname,tsay,yhid,intb from {$dbtbpre}enewstable where tid='{$tid}'");
}
//優化方案
$yh_options = '';
$yhsql = $empire->query("select id,yhname from {$dbtbpre}enewsyh order by id");
while ($yhr = $empire->fetch($yhsql)) {
    $select = '';
    if ($r[yhid] == $yhr[id]) {
        $select = ' selected';
    }
    $yh_options .= "<option value='" . $yhr[id] . "'" . $select . ">" . $yhr[yhname] . "</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=utf-8">
<title>新建數據表</title>
開發者ID:novnan,項目名稱:meiju,代碼行數:31,代碼來源:AddTable.php

示例12: explode

    $mid = (int) $_GET['mid'];
    $mtype = "";
    $r = $empire->fetch1("select * from {$dbtbpre}enewsmod where mid='{$mid}' and tid='{$tid}'");
    $url = "數據表:[" . $dbtbpre . "ecms_" . $tbname . "]&nbsp;>&nbsp;<a href=ListM.php?tid={$tid}&tbname={$tbname}" . $ecms_hashur['ehref'] . ">係統模型管理</a>&nbsp;>&nbsp;複製係統模型: " . $r['mname'];
}
//修改係統模型
if ($enews == "EditM") {
    $postword = '修改';
    $mid = (int) $_GET['mid'];
    $mtype = "";
    $url = "數據表:[" . $dbtbpre . "ecms_" . $tbname . "]&nbsp;>&nbsp;<a href=ListM.php?tid={$tid}&tbname={$tbname}" . $ecms_hashur['ehref'] . ">係統模型管理</a>&nbsp;>&nbsp;修改係統模型";
    $r = $empire->fetch1("select * from {$dbtbpre}enewsmod where mid='{$mid}' and tid='{$tid}'");
}
//取得字段
$no = 0;
$fsql = $empire->query("select f,fname,iscj,dotemp,tbdataf from {$dbtbpre}enewsf where isshow=1 and tid='{$tid}' 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] . ",";
    //錄入項
    if (strstr($r[enter], $like)) {
        $enterchecked = " checked";
        //取得字段標識
        $dor = explode($like, $r[enter]);
        if (strstr($dor[0], $record)) {
            $dor1 = explode($record, $dor[0]);
開發者ID:novnan,項目名稱:meiju,代碼行數:31,代碼來源:AddM.php

示例13: explode

    $ftype = "";
    $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)) {
開發者ID:BGCX261,項目名稱:zjh-dev-svn-to-git,代碼行數:31,代碼來源:AddMemberForm.php

示例14: urlencode

} else {
    $thisclassr = $empire->fetch1("select listorder from {$dbtbpre}enewsclass where classid='{$classid}'");
    if (empty($thisclassr[listorder])) {
        $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(eReturnSelfPage(1));
//標題分類
$tts = '';
$ttsql = $empire->query("select typeid,tname from {$dbtbpre}enewsinfotype where mid='{$modid}' order by myorder");
while ($ttr = $empire->fetch($ttsql)) {
    $select = '';
    if ($ttr[typeid] == $ttid) {
        $select = ' selected';
    }
    $tts .= "<option value='{$ttr['typeid']}'" . $select . ">{$ttr['tname']}</option>";
}
$stts = $tts ? "<select name='ttid'><option value='0'>標題分類</option>{$tts}</select>" : "";
//欄目鏈接
$getcurlr['classid'] = $classid;
$classurl = sys_ReturnBqClassname($getcurlr, 9);
//導入頁麵
$deftempfile = ECMS_PATH . DASHBOARD . '/data/html/list/doclistinfo.php';
if ($infomod_r[listfile]) {
    $tempfile = ECMS_PATH . DASHBOARD . '/data/html/list/doc' . $infomod_r[listfile] . '.php';
開發者ID:novnan,項目名稱:meiju,代碼行數:31,代碼來源:ListInfoDoc.php

示例15: mysqlquery

<?php

require 'global.php';
echo '';
require 'class/connect.php';
require 'class/db_sql.php';
require 'class/functions.php';
$rnd = $lur['rnd'];
$link = db_connect();
$empire = new mysqlquery();
$mydbname = RepPostVar($_GET['mydbname']);
if (empty($mydbname)) {
    printerror('NotChangeDb', 'history.go(-1)');
}
$udb = $empire->query('use `' . $mydbname . '`');
$mypath = $mydbname . '_' . date('YmdHis');
if ($phpsafemod) {
    $mypath = 'safemod';
}
$loadfile = RepPostVar($_GET['savefilename']);
if (strstr($loadfile, '.') || strstr($loadfile, '/') || strstr($loadfile, "\\")) {
    $loadfile = '';
}
if (empty($loadfile)) {
    $loadfile = 'def';
}
$loadfile = 'setsave/' . $loadfile;
@(include $loadfile);
if ($dmypath) {
    $mypath = $dmypath;
}
開發者ID:tanny2015,項目名稱:DataStructure,代碼行數:31,代碼來源:changetable.php


注:本文中的mysqlquery::query方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。