本文整理汇总了PHP中orderby_to_sqladd函数的典型用法代码示例。如果您正苦于以下问题:PHP orderby_to_sqladd函数的具体用法?PHP orderby_to_sqladd怎么用?PHP orderby_to_sqladd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了orderby_to_sqladd函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: modlog__find
function modlog__find($cond = array(), $orderby = array(), $page = 1, $pagesize = 20)
{
$cond = cond_to_sqladd($cond);
$orderby = orderby_to_sqladd($orderby);
$offset = ($page - 1) * $pagesize;
return db_find("SELECT * FROM `bbs_modlog` {$cond}{$orderby} LIMIT {$offset},{$pagesize}");
}
示例2: forum__find
function forum__find($cond = array(), $orderby = array(), $page = 1, $pagesize = 1000)
{
$cond = cond_to_sqladd($cond);
$orderby = orderby_to_sqladd($orderby);
$offset = ($page - 1) * $pagesize;
$forumlist = db_find("SELECT * FROM `bbs_forum` {$cond}{$orderby} LIMIT {$offset},{$pagesize}", 'fid');
return $forumlist;
}
示例3: thread__find
function thread__find($cond = array(), $orderby = array(), $page = 1, $pagesize = 20)
{
$cond = cond_to_sqladd($cond);
$orderby = orderby_to_sqladd($orderby);
$offset = ($page - 1) * $pagesize;
$arrlist = db_find("SELECT tid FROM `bbs_thread` {$cond}{$orderby} LIMIT {$offset},{$pagesize}");
if (empty($arrlist)) {
return array();
}
$tids = implode(',', arrlist_values($arrlist, 'tid'));
return db_find("SELECT * FROM `bbs_thread` WHERE tid IN ({$tids})");
}
示例4: friendlink_find
function friendlink_find($cond = array(), $orderby = array(), $page = 1, $pagesize = 1000)
{
$cond = cond_to_sqladd($cond);
$orderby = orderby_to_sqladd($orderby);
$offset = ($page - 1) * $pagesize;
$friendlinklist = db_find("SELECT * FROM `bbs_friendlink` {$cond}{$orderby} LIMIT {$offset},{$pagesize}", 'linkid');
if ($friendlinklist) {
foreach ($friendlinklist as &$friendlink) {
friendlink_format($friendlink);
}
}
return $friendlinklist;
}