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();
 }
Exemplo n.º 2
0
 public function get_byids($ids)
 {
     if (empty($ids)) {
         return array();
     }
     if (!is_array($ids)) {
         $ids = array($ids);
     }
     return parent::fetch_all($ids);
 }
 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;
 }
 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();
     }
 }
 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');
 }