当前位置: 首页>>代码示例>>PHP>>正文


PHP cond_to_sqladd函数代码示例

本文整理汇总了PHP中cond_to_sqladd函数的典型用法代码示例。如果您正苦于以下问题:PHP cond_to_sqladd函数的具体用法?PHP cond_to_sqladd怎么用?PHP cond_to_sqladd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了cond_to_sqladd函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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}");
}
开发者ID:xianyuxmu,项目名称:alinkagarden-xiuno,代码行数:7,代码来源:modlog.func.php

示例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;
}
开发者ID:xianyuxmu,项目名称:alinkagarden-xiuno,代码行数:8,代码来源:forum.func.php

示例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})");
}
开发者ID:xianyuxmu,项目名称:alinkagarden-xiuno,代码行数:12,代码来源:thread.func.php

示例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;
}
开发者ID:994724435,项目名称:Ride,代码行数:13,代码来源:friendlink.func.php

示例5: forum_access_count

function forum_access_count($cond = array())
{
    $cond = cond_to_sqladd($cond);
    $arr = db_find_one("SELECT COUNT(*) AS num FROM `bbs_forum_access` {$cond}");
    return $arr['num'];
}
开发者ID:994724435,项目名称:Ride,代码行数:6,代码来源:forum_access.func.php

示例6: attach_count

function attach_count($cond = array())
{
    $cond = cond_to_sqladd($cond);
    $arr = db_find_one("SELECT COUNT(*) AS num FROM `bbs_attach` {$cond}");
    return $arr['num'];
}
开发者ID:zhangjmy,项目名称:xibbs,代码行数:6,代码来源:attach.func.php

示例7: count

 public function count($table, $cond = array())
 {
     $cond = cond_to_sqladd($cond);
     $sql = "SELECT COUNT(*) AS num FROM `{$table}` {$cond}";
     $arr = $this->find_one($sql);
     return !empty($arr) ? intval($arr['num']) : $arr;
 }
开发者ID:xiuno,项目名称:xiunobbs,代码行数:7,代码来源:db.class.php


注:本文中的cond_to_sqladd函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。