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


PHP SqlHelper::execute_dql2方法代碼示例

本文整理匯總了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;
 }
開發者ID:JimChenAnother,項目名稱:notebook,代碼行數:7,代碼來源:messageModel.class.php

示例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;
 }
開發者ID:enmeen,項目名稱:git_empManage,代碼行數:8,代碼來源:EmpService.class.php

示例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;
 }
開發者ID:EricWenyi,項目名稱:Member-Management-System,代碼行數:8,代碼來源:StuService.class.php

示例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;
 }
開發者ID:jimmyZRone,項目名稱:test-ssh-key,代碼行數:14,代碼來源:empService.class.php

示例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;
 }
開發者ID:hnqing,項目名稱:xiahn,代碼行數:18,代碼來源:MessageService.class.php

示例6: QueryAllNation

 function QueryAllNation()
 {
     $sql = "select nationId,nationName from t_Nation";
     $sqlHelper = new SqlHelper();
     $res = $sqlHelper->execute_dql2($sql);
     // 關閉連接
     $sqlHelper->close_connect();
     return $res;
 }
開發者ID:otkinlife,項目名稱:MyPhalcon,代碼行數:9,代碼來源:NationService.class.php

示例7: QueryAllStudentInfo

 function QueryAllStudentInfo()
 {
     $sql = "select zkzh,name from t_StudentInfo";
     $sqlHelper = new SqlHelper();
     $res = $sqlHelper->execute_dql2($sql);
     // 關閉連接
     $sqlHelper->close_connect();
     return $res;
 }
開發者ID:otkinlife,項目名稱:MyPhalcon,代碼行數:9,代碼來源:StudentInfoService.class.php

示例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);
}
開發者ID:hnqing,項目名稱:xiahn,代碼行數:23,代碼來源:cometbyiframe.php

示例9: SqlHelper

<?php

	require_once 'SqlHelper.class.php';

	$sqlHelper=new SqlHelper();
	$arr=$sqlHelper->execute_dql2("select * from empmanage limit 20");
	print_r($arr);

?>
開發者ID:uhgy,項目名稱:phppractice,代碼行數:9,代碼來源:test.php


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