本文整理匯總了PHP中SqlHelper::execute_dql_fenye方法的典型用法代碼示例。如果您正苦於以下問題:PHP SqlHelper::execute_dql_fenye方法的具體用法?PHP SqlHelper::execute_dql_fenye怎麽用?PHP SqlHelper::execute_dql_fenye使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SqlHelper
的用法示例。
在下文中一共展示了SqlHelper::execute_dql_fenye方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getFenyePage
function getFenyePage($fenyePage){
$sqlHelper=new SqlHelper();
$sql1="select * from empmanage limit "
.($fenyePage->pageNow-1)*$fenyePage->pageSize.",".$fenyePage->pageSize;
$sql2="select count(id) from empmanage";
$sqlHelper->execute_dql_fenye($sql1,$sql2,$fenyePage);
$sqlHelper->close_connect();
}
示例2: getFenyePage
function getFenyePage($fenyePage)
{
// 創建一個SqlHelper對象實例
$sqlHelper = new SqlHelper();
//根據查詢條件構造sql語句
$sql1 = "select * from t_Nation where 1=1";
$sql2 = "select count(nationId) from t_Nation where 1=1";
$condition = "";
$sql1 = $sql1 . $condition . " limit " . ($fenyePage->pageNow - 1) * $fenyePage->pageSize . "," . $fenyePage->pageSize;
$sql2 = $sql2 . $condition;
//調用數據層執行查詢操作
$sqlHelper->execute_dql_fenye($sql1, $sql2, $fenyePage);
$sqlHelper->close_connect();
}
示例3: getFenyePage
function getFenyePage($fenyePage, $zkzh, $name, $kslb, $nation, $byxx, $hkszd, $address, $telephone, $cardNumber, $xjh)
{
// 創建一個SqlHelper對象實例
$sqlHelper = new SqlHelper();
//根據查詢條件構造sql語句
$sql1 = "select * from t_StudentInfo where 1=1";
$sql2 = "select count(zkzh) from t_StudentInfo where 1=1";
$condition = "";
if ($zkzh != "") {
$condition = $condition . " and zkzh like '%{$zkzh}%'";
}
if ($name != "") {
$condition = $condition . " and name like '%{$name}%'";
}
if ($kslb != "") {
$condition = $condition . " and kslb like '%{$kslb}%'";
}
if ($nation != "") {
$condition = $condition . " and nation={$nation}";
}
if ($byxx != "") {
$condition = $condition . " and byxx like '%{$byxx}%'";
}
if ($hkszd != "") {
$condition = $condition . " and hkszd like '%{$hkszd}%'";
}
if ($address != "") {
$condition = $condition . " and address like '%{$address}%'";
}
if ($telephone != "") {
$condition = $condition . " and telephone like '%{$telephone}%'";
}
if ($cardNumber != "") {
$condition = $condition . " and cardNumber like '%{$cardNumber}%'";
}
if ($xjh != "") {
$condition = $condition . " and xjh like '%{$xjh}%'";
}
$sql1 = $sql1 . $condition . " limit " . ($fenyePage->pageNow - 1) * $fenyePage->pageSize . "," . $fenyePage->pageSize;
$sql2 = $sql2 . $condition;
//調用數據層執行查詢操作
$sqlHelper->execute_dql_fenye($sql1, $sql2, $fenyePage);
$sqlHelper->close_connect();
}