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


PHP DB::fetch_all方法代码示例

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


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

示例1: getUserStatus

 public static function getUserStatus($uids)
 {
     $uid = implode("','", $uids);
     $limit = count($uids);
     $userList = DB::fetch_all('SELECT uid,username,status FROM %t WHERE uid in(%n) ORDER BY uid desc LIMIT %d', array('common_member', $uids, $limit), 'uid');
     return $userList;
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:7,代码来源:table_common_member.php

示例2: fetch_all

 function fetch_all($start, $limit, $where = '', $field = 'dateline', $sort = 'DESC')
 {
     if ($where) {
         $wherestr = "WHERE " . $where;
     }
     return DB::fetch_all("SELECT * FROM %t {$wherestr} ORDER BY %i {$sort} " . DB::limit($start, $limit), array($this->_table, $field));
 }
开发者ID:jammarmalade,项目名称:blog,代码行数:7,代码来源:t_tag.php

示例3: fetch_all_by_access

 public function fetch_all_by_access($access)
 {
     if (!is_numeric($access) && !is_array($access)) {
         return array();
     }
     return DB::fetch_all('SELECT * FROM %t WHERE ' . DB::field('access', $access) . ' ORDER BY dateline DESC', array($this->_table));
 }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:7,代码来源:table_common_adminnote.php

示例4: fetch_all_by_action

 public function fetch_all_by_action($action)
 {
     if (!empty($action)) {
         return DB::fetch_all('SELECT * FROM %t WHERE action IN(%n)', array($this->_table, $action), $this->_pk);
     }
     return array();
 }
开发者ID:tang86,项目名称:discuz-utf8,代码行数:7,代码来源:table_common_credit_rule.php

示例5: draw

 function draw()
 {
     global $display;
     $cmd = Url::get('cmd');
     if ($cmd == 'update') {
         AZMemcache::do_put("prhot_ver:", 0);
         Url::redirect_current();
     }
     $this->beginForm();
     $list_cat = array(999999999 => 'Mặc định', 0 => 'Trang chủ');
     $list_cat += AZLib::getTopCats();
     $item = DB::fetch_all('SELECT item_id,status,product_hot_cat_id,end_time,start_time FROM product_hot');
     $items_tmp = array();
     foreach ($item as $values) {
         if (isset($list_cat[$values['product_hot_cat_id']])) {
             $items_tmp[$values['product_hot_cat_id']]['cat_name'] = $list_cat[$values['product_hot_cat_id']];
             if ($values['status'] == 1) {
                 $items_tmp[$values['product_hot_cat_id']]['item_vip'][$values['item_id']]['cat_id'] = $values['product_hot_cat_id'];
                 $items_tmp[$values['product_hot_cat_id']]['item_vip'][$values['item_id']]['start_time'] = date("d/m/Y", $values['start_time']);
                 $items_tmp[$values['product_hot_cat_id']]['item_vip'][$values['item_id']]['end_time'] = date("d/m/Y", $values['end_time']);
             } else {
                 $items_tmp[$values['product_hot_cat_id']]['item'][$values['item_id']] = $values['product_hot_cat_id'];
             }
         }
     }
     $items = array();
     foreach ($list_cat as $key => $values) {
         if (isset($items_tmp[$key])) {
             $items[$key] = $items_tmp[$key];
         }
     }
     $display->add('items', $items);
     $display->output('ManageProductHot');
     $this->endForm();
 }
开发者ID:duynhan07,项目名称:elink,代码行数:35,代码来源:ManageProductHot.php

示例6: all

 public static function all()
 {
     static $query;
     DB::prepare_query($query, "SELECT * FROM `judge_daemon` ORDER BY `judge_host`");
     $query->execute();
     return DB::fetch_all('JudgeDaemon', $query);
 }
开发者ID:jlsa,项目名称:justitia,代码行数:7,代码来源:JudgeDaemon.php

示例7: fetch_all_by_fid

 public function fetch_all_by_fid($fid, $position = false, $moderatorid = false, $start = 0, $limit = 0)
 {
     $position = $position ? ' AND ' . DB::field('position', array(0, $position)) : '';
     $moderatorid = $moderatorid ? ' AND ' . DB::field('moderatorid', array(0, $moderatorid)) : '';
     $limit = $start && $limit ? ' LIMIT ' . intval($start) . ', ' . intval($limit) : '';
     return DB::fetch_all('SELECT * FROM %t WHERE fid=%d %i %i ORDER BY displayorder %i', array($this->_table, $fid, $position, $moderatorid, $limit));
 }
开发者ID:lemonstory,项目名称:bbs,代码行数:7,代码来源:table_forum_forumrecommend.php

示例8: get_sitemap_list

 public function get_sitemap_list($type, $offset=0, $limit=0)
 {
     if ($offset >= 0 && $limit > 0) {
         return DB::fetch_all('SELECT * FROM %t WHERE type=%d LIMIT %d, %d', array($this->_table, $type, $offset, $limit));
     }
     return DB::fetch_all('SELECT * FROM %t WHERE type=%d', array($this->_table, $type));
 }
开发者ID:TedaLIEz,项目名称:Backup,代码行数:7,代码来源:table_baidusubmit_sitemap.php

示例9: fetch_all_inviteuid

 public function fetch_all_inviteuid($fid, $inviteuids, $uid)
 {
     if (empty($fid) || empty($uid) || empty($inviteuids)) {
         return array();
     }
     return DB::fetch_all("SELECT inviteuid FROM %t WHERE fid=%d AND " . DB::field('inviteuid', $inviteuids) . " AND uid=%d", array($this->_table, $fid, $uid));
 }
开发者ID:lemonstory,项目名称:bbs,代码行数:7,代码来源:table_forum_groupinvite.php

示例10: fetch_all_by_search

 public function fetch_all_by_search($username, $start = 0, $limit = 0, $order = 'dateline', $sort = 'DESC')
 {
     $ordersql = $order ? " ORDER BY {$order} {$sort} " : '';
     $wheresql = 'WHERE 1';
     $wheresql .= $username ? ' AND ' . DB::field('username', $username, 'like') : '';
     return DB::fetch_all('SELECT * FROM %t %i %i ' . DB::limit($start, $limit), array($this->_table, $wheresql, $ordersql));
 }
开发者ID:vanloswang,项目名称:discuzx-1,代码行数:7,代码来源:table_weibo.php

示例11: fetch_all_by_default

 public function fetch_all_by_default()
 {
     if (($data = $this->fetch_cache('all')) === false) {
         $data = DB::fetch_all("SELECT * FROM %t WHERE `default`!='' ORDER BY display DESC", array($this->_table));
     }
     return $data;
 }
开发者ID:druphliu,项目名称:dzzoffice,代码行数:7,代码来源:table_folder_default.php

示例12: fetch_all_by_id

 public function fetch_all_by_id($id)
 {
     if (!$id) {
         return;
     }
     return DB::fetch_all("SELECT * FROM %t WHERE %i ORDER BY displayorder", array($this->_table, DB::field('medalid', $id)));
 }
开发者ID:softhui,项目名称:discuz,代码行数:7,代码来源:table_forum_medal.php

示例13: fetch_all

 public function fetch_all($uids, $variables)
 {
     if (empty($uids) || empty($variables)) {
         return array();
     }
     return DB::fetch_all('SELECT * FROM %t WHERE ' . DB::field('uid', $uids) . ' AND ' . DB::field('variable', $variables), array($this->_table));
 }
开发者ID:lemonstory,项目名称:bbs,代码行数:7,代码来源:table_forum_spacecache.php

示例14: fetch_all_by_uid

 public function fetch_all_by_uid($uid)
 {
     if (!$uid) {
         return null;
     }
     return DB::fetch_all('SELECT * FROM %t WHERE %i', array($this->_table, DB::field('uid', $uid)), $this->_pk);
 }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:7,代码来源:table_forum_collectionfollow.php

示例15: fetch_all_for_order

 public function fetch_all_for_order($typeid = array())
 {
     if (!empty($typeid)) {
         $where = ' WHERE ' . DB::field('typeid', $typeid);
     }
     return DB::fetch_all("SELECT * FROM " . DB::table('forum_threadtype') . " {$where} ORDER BY displayorder");
 }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:7,代码来源:table_forum_threadtype.php


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