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


PHP XDB::fetch_all方法代码示例

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


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

示例1: fetch_all_by_searchc

 public function fetch_all_by_searchc($condition, $orderby, $start = 0, $ppp = 0)
 {
     if (is_array($condition)) {
         $where = " AND " . implode($condition, ' AND ');
     }
     return XDB::fetch_all("SELECT * FROM %t WHERE 1 %i ORDER BY %i LIMIT %d, %d", array($this->_table, $where, $orderby, $start, $ppp));
 }
开发者ID:herosrx,项目名称:shops,代码行数:7,代码来源:table_sanree_brand_msg.php

示例2: fetch_all_by_name

 public function fetch_all_by_name($name)
 {
     if (!empty($name)) {
         return XDB::fetch_all('SELECT * FROM %t WHERE ' . XDB::field('name', $name), array($this->_table));
     }
     return array();
 }
开发者ID:herosrx,项目名称:shops,代码行数:7,代码来源:table_common_district.php

示例3: fetch_all_by_fid

 public function fetch_all_by_fid($fids)
 {
     if (empty($fids)) {
         return array();
     }
     return XDB::fetch_all('SELECT * FROM %t WHERE ' . XDB::field('fid', $fids), array($this->_table));
 }
开发者ID:herosrx,项目名称:shops,代码行数:7,代码来源:table_forum_forum_threadtable.php

示例4: fetch_all

 public function fetch_all()
 {
     $retdata = array();
     foreach (XDB::fetch_all("SELECT langkey,langvalue FROM %t WHERE 1", array($this->_table)) as $key => $value) {
         $retdata[$value['langkey']] = $value['langvalue'];
     }
     return $retdata;
 }
开发者ID:herosrx,项目名称:shops,代码行数:8,代码来源:table_sanree_brand_language.php

示例5: fetch_all_by_id_idtype

 public function fetch_all_by_id_idtype($id, $idtype, $start = 0, $limit = 0)
 {
     $parameter = array($this->_table, $this->_membertable);
     $wherearr = array();
     $parameter[] = $id;
     $wherearr[] = "f.id=%d";
     if (!empty($idtype)) {
         $parameter[] = $idtype;
         $wherearr[] = "f.idtype=%s";
     }
     $wheresql = !empty($wherearr) && is_array($wherearr) ? ' WHERE ' . implode(' AND ', $wherearr) : '';
     return XDB::fetch_all("SELECT f.*,m.username FROM %t as f\n\t\t  LEFT JOIN %t as m ON f.uid = m.uid\t\t\n\t\t {$wheresql} ORDER BY f.dateline DESC " . XDB::limit($start, $limit), $parameter, $this->_pk);
 }
开发者ID:herosrx,项目名称:shops,代码行数:13,代码来源:table_home_favorite.php

示例6: fetch_all_forblock

 public function fetch_all_forblock($where, $orderby, $ordersc, $itemsnum)
 {
     return XDB::fetch_all("SELECT * FROM %t %i ORDER BY %i %i %i", array($this->_table, $where, $orderby, $ordersc, $itemsnum));
 }
开发者ID:herosrx,项目名称:shops,代码行数:4,代码来源:table_sanree_brand_category.php

示例7: fetch_all

 public function fetch_all()
 {
     return XDB::fetch_all("SELECT * FROM %t\t", array($this->_table));
 }
开发者ID:herosrx,项目名称:shops,代码行数:4,代码来源:table_sanree_brand_friendly_link.php

示例8: fetch_all_field_perm

 public function fetch_all_field_perm()
 {
     return XDB::fetch_all("SELECT fid, viewperm, postperm, replyperm, getattachperm, postattachperm, postimageperm FROM " . XDB::table($this->_table) . " WHERE founderuid=0");
 }
开发者ID:herosrx,项目名称:shops,代码行数:4,代码来源:table_forum_forumfield.php

示例9: fetch_all_creditslower_order

 public function fetch_all_creditslower_order()
 {
     return XDB::fetch_all("SELECT * FROM " . XDB::table('forum_grouplevel') . " WHERE 1 ORDER BY creditslower");
 }
开发者ID:herosrx,项目名称:shops,代码行数:4,代码来源:table_forum_grouplevel.php

示例10: fetch_all_by_order

 public function fetch_all_by_order($order)
 {
     return XDB::fetch_all("SELECT * FROM %t WHERE `order`>%d ORDER BY `order` ", array($this->_table, $order));
 }
开发者ID:herosrx,项目名称:shops,代码行数:4,代码来源:table_sanree_brand_group.php

示例11: getusermenu

 public function getusermenu($istop = 0)
 {
     return XDB::fetch_all("SELECT * FROM %t WHERE 1 and status=1 and istop=%d ORDER BY displayorder ", array($this->_table, $istop));
 }
开发者ID:herosrx,项目名称:shops,代码行数:4,代码来源:table_sanree_brand_cmenu.php

示例12: fetch_all_by_pid_width

 public function fetch_all_by_pid_width($tableid, $pids, $width)
 {
     return XDB::fetch_all("SELECT * FROM %t WHERE %i AND isimage IN ('1', '-1') AND width>=%d", array($this->_get_table($tableid), XDB::field('pid', $pids), $width));
 }
开发者ID:herosrx,项目名称:shops,代码行数:4,代码来源:table_forum_attachment_n.php

示例13: fetch_all_for_grouplist

 public function fetch_all_for_grouplist($orderby = 'displayorder', $fieldarray = array(), $num = 1, $fids = array(), $sort = 0, $getcount = 0)
 {
     if ($fieldarray && is_array($fieldarray)) {
         $fieldadd = '';
         foreach ($fieldarray as $field) {
             $fieldadd .= $field . ', ';
         }
     } else {
         $fieldadd = 'ff.*, ';
     }
     $start = 0;
     if (is_array($num)) {
         list($start, $snum) = $num;
     } else {
         $snum = $num;
     }
     $orderbyarray = array('displayorder' => 'f.displayorder DESC', 'dateline' => 'ff.dateline DESC', 'lastupdate' => 'ff.lastupdate DESC', 'membernum' => 'ff.membernum DESC', 'thread' => 'f.threads DESC', 'activity' => 'f.commoncredits DESC');
     $useindex = $orderby == 'displayorder' ? 'USE INDEX(fup_type)' : '';
     $orderby = !empty($orderby) && $orderbyarray[$orderby] ? "ORDER BY " . $orderbyarray[$orderby] : '';
     $limitsql = $num ? "LIMIT {$start}, {$snum} " : '';
     $field = $sort ? 'fup' : 'fid';
     $fids = $fids && is_array($fids) ? 'f.' . $field . ' IN (' . dimplode($fids) . ')' : '';
     if (empty($fids)) {
         $levelsql = " AND f.level>'-1'";
     }
     $fieldsql = $fieldadd . ' f.fid, f.name, f.threads, f.posts, f.todayposts, f.level as flevel ';
     if ($getcount) {
         return XDB::result_first("SELECT count(*) FROM " . XDB::table($this->_table) . " f {$useindex} WHERE" . ($fids ? " {$fids} AND " : '') . " f.type='sub' AND f.status=3 {$levelsql}");
     }
     return XDB::fetch_all("SELECT {$fieldsql} FROM " . XDB::table($this->_table) . " f {$useindex} LEFT JOIN " . XDB::table("forum_forumfield") . " ff ON ff.fid=f.fid WHERE" . ($fids ? " {$fids} AND " : '') . " f.type='sub' AND f.status=3 {$levelsql} {$orderby} {$limitsql}");
 }
开发者ID:herosrx,项目名称:shops,代码行数:31,代码来源:table_forum_forum.php

示例14: fetch_all_mf

 public function fetch_all_mf()
 {
     return XDB::fetch_all("SELECT * FROM %t ORDER BY displayorder", array($this->_table));
 }
开发者ID:herosrx,项目名称:shops,代码行数:4,代码来源:table_sanree_brand_mf.php

示例15: getuid_by_bid

 public function getuid_by_bid($bid)
 {
     return XDB::fetch_all("SELECT uid FROM %t WHERE bid=%d", array($this->_table, $bid));
 }
开发者ID:herosrx,项目名称:shops,代码行数:4,代码来源:table_sanree_brand_menu_order.php


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