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


PHP self::fetchAll方法代码示例

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


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

示例1: getUsers

 public static function getUsers()
 {
     $userModel = new self();
     $select = $userModel->select();
     $select->order(array('last_name', 'first_name'));
     return $userModel->fetchAll($select);
 }
开发者ID:mtaha1990,项目名称:onlineDR,代码行数:7,代码来源:User.php

示例2: _setup

 /**
  * Все таблицы для хранения данных имеют префикс
  *
  */
 protected function _setup()
 {
     parent::_setup();
     $this->_cleanName = $this->_name;
     $this->_name = self::PREFIX_TABLE . $this->_name;
     if (false == array_key_exists($this->_cleanName, self::$setupedTables)) {
         $modelFields = new Modules_Publications_Model_Fields();
         $this->_tableProfile = $modelFields->fetchAllByTableName($this->_cleanName);
         foreach ($this->_tableProfile as $row) {
             if ($row->list_values) {
                 if (false == array_key_exists($row->list_values, self::$linkedData)) {
                     if ('routes' == $row->list_values) {
                         self::$linkedData[$row->list_values] = Modules_Router_Model_Router::getInstance()->getRoutesTreeHash();
                     } else {
                         $model = new self($row->list_values);
                         self::$linkedData[$row->list_values] = $model->fetchAll()->toArray();
                     }
                 }
                 self::$linkedFieldsTableData[$this->_cleanName . '_' . $row->name] = self::$linkedData[$row->list_values];
             }
         }
         self::$setupedTables[$this->_cleanName] = $this->_tableProfile;
     } else {
         $this->_tableProfile = self::$setupedTables[$this->_cleanName];
     }
 }
开发者ID:kytvi2p,项目名称:ZettaFramework,代码行数:30,代码来源:Table.php

示例3: getTypes

 public static function getTypes()
 {
     $Type = new self();
     $Types = $Type->fetchAll(null, "Type");
     if ($Types) {
         return $Types->toArray();
     } else {
         return array();
     }
 }
开发者ID:BGCX262,项目名称:zweer-gdr-svn-to-git,代码行数:10,代码来源:PageType.php

示例4: getDomainModel

 /**
  * Returns the topics table as a domain model.
  * STAGE 3: Choose, create, and optionally update models using business logic.
  * The domain model can be manipulated later by controllers.
  * @return array of topic row set objects indexed by topic id
  */
 public static function getDomainModel()
 {
     if (self::$_domainModel === null) {
         $topicsTable = new self();
         $rowset = $topicsTable->fetchAll(1, 'modification_time');
         foreach ($rowset as $row) {
             self::$_domainModel[$row->topic_id] = $row;
         }
     }
     return self::$_domainModel;
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:17,代码来源:Topics.php

示例5: getMapMultiOptions

 /**
  *
  * get multi Options country for google map
  */
 public static function getMapMultiOptions()
 {
     $t = new self();
     $select = $t->select()->where('status= 1')->order('name');
     $result = array();
     $result[''] = '';
     foreach ($t->fetchAll($select) as $item) {
         $result[$item->name] = $item->name;
     }
     return $result;
 }
开发者ID:hoalangoc,项目名称:ftf,代码行数:15,代码来源:Countries.php

示例6: getPageAlbums

 public static function getPageAlbums($IDPage)
 {
     $Ret = array();
     $A = new self();
     $Albums = $A->fetchAll("IDParent = '{$IDPage}' AND Extension IS NULL", 'Title');
     if ($Albums) {
         foreach ($Albums as $Album) {
             $A = new self();
             $Ret[] = $A->copyFromDb($Album);
         }
     }
     return $Ret;
 }
开发者ID:BGCX262,项目名称:zweer-gdr-svn-to-git,代码行数:13,代码来源:Album.php

示例7: fetchAllRecords

 public static function fetchAllRecords($quiz_id)
 {
     $self = new self();
     $constraints = array(array("mode" => "AND", "key" => "quiz_id", "value" => $quiz_id, "method" => "="));
     $objs = $self->fetchAll($constraints, "=", "AND", $self->default_sort_column, $sort_order);
     $output = array();
     if (!empty($objs)) {
         foreach ($objs as $o) {
             $output[] = $o;
         }
     }
     return $output;
 }
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:13,代码来源:Contact.php

示例8: fetchAllRecords

 public static function fetchAllRecords($qquestion_id, $response_active = 1)
 {
     $self = new self();
     $constraints = array(array("mode" => "AND", "key" => "qquestion_id", "value" => $qquestion_id, "method" => "="), array("mode" => "AND", "key" => "response_active", "value" => $response_active, "method" => "="));
     $objs = $self->fetchAll($constraints, "=", "AND", $sort_col, $sort_order);
     $output = array();
     if (!empty($objs)) {
         foreach ($objs as $o) {
             $output[] = $o;
         }
     }
     return $output;
 }
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:13,代码来源:Response.php

示例9: getNew

 public static function getNew($IDParent, $lastID)
 {
     $TheChat = new self();
     $Messages = $TheChat->fetchAll("IDParent = '{$IDParent}' AND IDChat > {$lastID} AND Date + INTERVAL 20 MINUTE > NOW()", "Date");
     $Ret = array();
     if ($Messages) {
         foreach ($Messages as $Message) {
             $TheChat = new self();
             $Ret[] = $TheChat->copyFromDb($Message);
         }
     }
     return $Ret;
 }
开发者ID:BGCX262,项目名称:zweer-gdr-svn-to-git,代码行数:13,代码来源:Chat.php

示例10: getPhotosByAlbum

 public static function getPhotosByAlbum($IDAlbum)
 {
     $ThePhoto = new self();
     $Photos = $ThePhoto->fetchAll("IDParent = '{$IDAlbum}' AND Extension IS NOT NULL");
     $Ret = array();
     if ($Photos) {
         foreach ($Photos as $Photo) {
             $ThePhoto = new self();
             $Ret[] = $ThePhoto->copyFromDb($Photo);
         }
     }
     return $Ret;
 }
开发者ID:BGCX262,项目名称:zweer-gdr-svn-to-git,代码行数:13,代码来源:Photo.php

示例11: fetchAllRecords

 public static function fetchAllRecords($status = "open")
 {
     $self = new self();
     $constraints = array(array("mode" => "AND", "key" => "status", "value" => $status, "method" => "="));
     $objs = $self->fetchAll($constraints, "=", "AND", $sort_col, $sort_order);
     $output = array();
     if (!empty($objs)) {
         foreach ($objs as $o) {
             $output[] = $o;
         }
     }
     return $output;
 }
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:13,代码来源:Draft.php

示例12: fetchAllByDraftID

 public static function fetchAllByDraftID($draft_id = 0)
 {
     $self = new self();
     $constraints = array(array("mode" => "AND", "key" => "draft_id", "value" => $draft_id, "method" => "="));
     $objs = $self->fetchAll($constraints, "=", "AND", $sort_col, $sort_order);
     $output = array();
     if (!empty($objs)) {
         foreach ($objs as $o) {
             $output[] = $o;
         }
     }
     return $output;
 }
开发者ID:nadeemshafique,项目名称:entrada-1x,代码行数:13,代码来源:Creator.php

示例13: getConversation

 public static function getConversation($IDMessage)
 {
     $TheMessage = new self();
     $Select = $TheMessage->select()->join(array('mm' => 'message'), 'message.IDParent = mm.IDParent', array())->where("mm.IDMessage = '{$IDMessage}'")->order("mm.Date");
     $Messages = $TheMessage->fetchAll($Select);
     $Ret = array();
     if ($Messages) {
         foreach ($Messages as $Message) {
             $TheMessage = new self();
             $Ret[] = $TheMessage->copyFromDb($Message);
         }
     }
     return $Ret;
 }
开发者ID:BGCX262,项目名称:zweer-gdr-svn-to-git,代码行数:14,代码来源:Messaggio.php

示例14: getPosts

 public function getPosts($Start = 0, $Limit = self::POSTS_LIMIT)
 {
     $TheForum = new self();
     $Posts = $TheForum->fetchAll("IDParent = '" . $this->IDForum . "' AND IsForum = '0'", "DateLastModify", $Limit, $Start);
     $Ret = array();
     if ($Posts) {
         foreach ($Posts as $Post) {
             $TheForum = new Zwe_Forum_Message_Post();
             $TheForum->copyFromDb($Post);
             $Ret[] = $TheForum;
         }
     }
     return $Ret;
 }
开发者ID:BGCX262,项目名称:zweer-gdr-svn-to-git,代码行数:14,代码来源:Forum.php

示例15: getComments

 public function getComments($Start = 0, $Limit = self::COMMENTS_LIMIT)
 {
     $TheForum = new self();
     $Comments = $TheForum->fetchAll("IDParent = '" . $this->IDForum . "'", "Date", $Limit, $Start);
     $Ret = array();
     if ($Comments) {
         foreach ($Comments as $Comment) {
             $TheForum = new Zwe_Forum_Message_Comment();
             $TheForum->copyFromDb($Comment);
             $Ret[] = $TheForum;
         }
     }
     return $Ret;
 }
开发者ID:BGCX262,项目名称:zweer-gdr-svn-to-git,代码行数:14,代码来源:Post.php


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