本文整理匯總了PHP中discuz_table::fetch_all方法的典型用法代碼示例。如果您正苦於以下問題:PHP discuz_table::fetch_all方法的具體用法?PHP discuz_table::fetch_all怎麽用?PHP discuz_table::fetch_all使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類discuz_table
的用法示例。
在下文中一共展示了discuz_table::fetch_all方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: fetch_all_by_bid
public function fetch_all_by_bid($bids, $sort = false)
{
if ($sort == false) {
return parent::fetch_all($bids);
}
return ($bids = dintval($bids, true)) ? DB::fetch_all('SELECT * FROM ' . DB::table($this->_table) . ' WHERE ' . DB::field('bid', $bids) . ($sort ? ' ORDER BY displayorder, itemtype DESC' : ''), null, $this->_pk) : array();
}
示例2: get_byids
public function get_byids($ids)
{
if (empty($ids)) {
return array();
}
if (!is_array($ids)) {
$ids = array($ids);
}
return parent::fetch_all($ids);
}
示例3: fetch_all
public function fetch_all($ids, $force_from_db = false, $fetch_archive = 1)
{
$data = array();
if (!empty($ids)) {
$data = parent::fetch_all($ids, $force_from_db);
if (isset($this->membersplit) && $fetch_archive && count($data) != count($ids)) {
$data = $data + C::t($this->_table . '_archive')->fetch_all(array_diff($ids, array_keys($data)));
}
}
return $data;
}
示例4: fetch_all
public function fetch_all($ids, $force_from_db = false)
{
$datas = parent::fetch_all($ids, $force_from_db);
if ($datas) {
foreach ($datas as &$data) {
$data['data'] = unserialize($data['data']);
}
return $datas;
} else {
return array();
}
}
示例5: fetch_all_by_pids
public function fetch_all_by_pids($pids)
{
return parent::fetch_all($pids);
//return DB::fetch_all('SELECT * FROM %t WHERE '.DB::field('pid', $pids), array($this->_table), 'pid');
}