當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。