當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。