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


PHP SearchHelper::convertThread方法代码示例

本文整理汇总了PHP中SearchHelper::convertThread方法的典型用法代码示例。如果您正苦于以下问题:PHP SearchHelper::convertThread方法的具体用法?PHP SearchHelper::convertThread怎么用?PHP SearchHelper::convertThread使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SearchHelper的用法示例。


在下文中一共展示了SearchHelper::convertThread方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: preGetThreads

 function preGetThreads($table, $tIds)
 {
     $tIds = implode($tIds, ', ');
     $result = array();
     if ($tIds) {
         $sql = sprintf("SELECT * FROM %s WHERE tid IN (%s)", $table, $tIds);
         $query = DB::query($sql);
         while ($thread = DB::fetch($query)) {
             $thread['pid'] = $threadPosts[$thread['tid']]['pId'];
             $result[$thread['tid']] = SearchHelper::convertThread($thread);
         }
     }
     return $result;
 }
开发者ID:pan289091315,项目名称:Discuz,代码行数:14,代码来源:Manyou.php

示例2: _getAllThreads

 function _getAllThreads($table, $num, $tid = 0, $orderType = 'ASC')
 {
     $result = array();
     $op = $orderType == 'DESC' ? '<' : '>';
     $key = $orderType == 'DESC' ? 'minTid' : 'maxTid';
     $sql = sprintf("SELECT * FROM %s\n\t\t\t\tWHERE tid %s %d\n\t\t\t\tORDER BY tid %s\n\t\t\t\tLIMIT %d", $table, $op, $tid, $orderType, $num);
     $query = DB::query($sql);
     $tIds = array();
     while ($thread = DB::fetch($query)) {
         if ($thread['displayorder'] >= 0) {
             $result[$key] = $thread['tid'];
             $result['data'][$thread['tid']] = SearchHelper::convertThread($thread);
         }
     }
     return $result;
 }
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:16,代码来源:my.php

示例3: _getAllThreads

 function _getAllThreads($table, $num, $tid = 0, $orderType = 'ASC')
 {
     $result = array();
     $op = $orderType == 'DESC' ? '<' : '>';
     $key = $orderType == 'DESC' ? 'minTid' : 'maxTid';
     $sql = sprintf("SELECT * FROM %s\n\t\t\t\tWHERE tid %s %d\n\t\t\t\tORDER BY tid %s\n\t\t\t\tLIMIT %d", $table, $op, $tid, $orderType, $num);
     $query = DB::query($sql);
     $tIds = $vtIds = array();
     while ($thread = DB::fetch($query)) {
         $result[$key] = $thread['tid'];
         $result['data'][$thread['tid']] = SearchHelper::convertThread($thread);
         if ($result['data'][$thread['tid']]['specialType'] == 'poll') {
             $vtIds[] = $thread['tid'];
         }
     }
     $polls = SearchHelper::getPollInfo($vtIds);
     foreach ($polls as $tId => $poll) {
         $result['data'][$tId]['pollInfo'] = $poll;
     }
     return $result;
 }
开发者ID:pan289091315,项目名称:Discuz,代码行数:21,代码来源:my.php


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