本文整理汇总了PHP中SqlHelper::execute_dql2方法的典型用法代码示例。如果您正苦于以下问题:PHP SqlHelper::execute_dql2方法的具体用法?PHP SqlHelper::execute_dql2怎么用?PHP SqlHelper::execute_dql2使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SqlHelper
的用法示例。
在下文中一共展示了SqlHelper::execute_dql2方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showMessageByPage
public function showMessageByPage($fenyePage, $loginname)
{
$sql = "select *from message where getter = '" . $loginname . "'" . "limit " . $fenyePage->pageSize * ($fenyePage->page - 1) . "," . $fenyePage->pageSize;
$sqlHelper = new SqlHelper();
$res = $sqlHelper->execute_dql2($sql);
return $res;
}
示例2: getEmpListByPage
function getEmpListByPage($pageNow, $pageSize)
{
$sql = "select * from emp limit " . ($pageNow - 1) * $pageSize . ",{$pageSize}";
$sqlHelper = new SqlHelper();
$res = $sqlHelper->execute_dql2($sql);
$sqlHelper->close_connect();
return $res;
}
示例3: getStuListByPage
public function getStuListByPage($pageNow, $pageSize)
{
$sql = "select * from student limit " . ($pageNow - 1) * $pageSize . ",{$pageSize}";
$sqlHelper = new SqlHelper();
$res2 = $sqlHelper->execute_dql2($sql);
//free
return $res2;
}
示例4: updateEmp
public function updateEmp($id)
{
$sql = "select * from emp where id={$id}";
$sqlHelper = new SqlHelper();
$arr = $sqlHelper->execute_dql2($sql);
$sqlHelper->close_connect();
$emp = new Emp();
$emp->setId($arr['0']['id']);
$emp->setName($arr['0']['name']);
$emp->setGrade($arr['0']['grade']);
$emp->setEmail($arr['0']['email']);
//return $arr;
return $emp;
}
示例5: getMessage
function getMessage($getter, $sender)
{
$sql = "select * from mes where getter='{$getter}' and sender='{$sender}' and state=0";
$mesXML = "<meses>";
$sqlHelper = new SqlHelper();
$mesList = $sqlHelper->execute_dql2($sql);
if (count($mesList) != 0) {
for ($i = 0; $i < count($mesList); $i++) {
$row = $mesList[$i];
$mesXML .= "<id>{$row['id']}</id><sender>{$row['sender']}</sender><getter>{$row['getter']}</getter><con>{$row['content']}</con><sendTime>{$row['sendTime']}</sendTime>";
}
$sql = "update mes set state=1 where getter='{$getter}' and sender='{$sender}'";
$res = $sqlHelper->execute_dml($sql);
}
$mesXML .= "</meses>";
$sqlHelper->close_connect();
return $mesXML;
}
示例6: QueryAllNation
function QueryAllNation()
{
$sql = "select nationId,nationName from t_Nation";
$sqlHelper = new SqlHelper();
$res = $sqlHelper->execute_dql2($sql);
// 关闭连接
$sqlHelper->close_connect();
return $res;
}
示例7: QueryAllStudentInfo
function QueryAllStudentInfo()
{
$sql = "select zkzh,name from t_StudentInfo";
$sqlHelper = new SqlHelper();
$res = $sqlHelper->execute_dql2($sql);
// 关闭连接
$sqlHelper->close_connect();
return $res;
}
示例8: SqlHelper
<?php
require_once 'SqlHelper.class.php';
$kefu = $_COOKIE["KEFU"];
set_time_limit(0);
$i = 0;
$sqlHelper = new SqlHelper();
while (true) {
echo $i++ . "</br>";
$sql = "select * from mes where getter='{$kefu}' and state=0 limit 1";
$res = $sqlHelper->execute_dql2($sql);
if (!empty($res)) {
$sql = "update mes set state=1 where id=" . $res[0]['id'];
$sqlHelper->execute_dql($sql);
$msg = json_encode($res[0]);
echo "<script type='text/javascript'>";
echo "parent.window.comet({$msg});";
echo "</script>";
}
ob_flush();
flush();
sleep(1);
}
示例9: SqlHelper
<?php
require_once 'SqlHelper.class.php';
$sqlHelper=new SqlHelper();
$arr=$sqlHelper->execute_dql2("select * from empmanage limit 20");
print_r($arr);
?>