当前位置: 首页>>代码示例>>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;未经允许,请勿转载。