當前位置: 首頁>>代碼示例>>PHP>>正文


PHP JDatabase::loadColumn方法代碼示例

本文整理匯總了PHP中JDatabase::loadColumn方法的典型用法代碼示例。如果您正苦於以下問題:PHP JDatabase::loadColumn方法的具體用法?PHP JDatabase::loadColumn怎麽用?PHP JDatabase::loadColumn使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在JDatabase的用法示例。


在下文中一共展示了JDatabase::loadColumn方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: find

 /**
  * Get items.
  *
  * Derived classes should generally override this function to return correct objects.
  *
  * @return array
  */
 public function find()
 {
     if ($this->skip) {
         return array();
     }
     $query = clone $this->query;
     $this->build($query);
     $query->select('a.' . $this->primaryKey);
     $this->db->setQuery($query, $this->start, $this->limit);
     $results = (array) $this->db->loadColumn();
     KunenaError::checkDatabaseError();
     return $results;
 }
開發者ID:anawu2006,項目名稱:PeerLearning,代碼行數:20,代碼來源:finder.php

示例2: queryResultArray

 /**
  * Execute a query to the database and  get an array of values from the <var>$numinarray</var> field in
  * each row of the result set from the database query.
  *
  * The result returned by this method is the same as the one returned by JDatabase::loadColumn()
  *
  * @param string $query The query to be executed
  * @param int $numinarray The offset of the result to get
  *
  * @return mixed The result of the query
  *
  * @throws RuntimeException
  *
  * @since 1.0.0
  */
 public function queryResultArray($query, $numinarray = 0)
 {
     // query database table
     $this->_database->setQuery($query);
     return $this->_database->loadColumn($numinarray);
 }
開發者ID:JBZoo,項目名稱:Zoo-Changelog,代碼行數:21,代碼來源:database.php

示例3: loadResultArray

 /**
  * Load an array of single field results into an array
  *
  * @param   int  $offset  The row offset to use to build the result array
  * @return  array         The array with the result (empty in case of error)
  *
  * @throws  \RuntimeException
  */
 public function loadResultArray($offset = 0)
 {
     return $this->_nullToArray($this->_db->loadColumn($offset));
 }
開發者ID:bobozhangshao,項目名稱:HeartCare,代碼行數:12,代碼來源:CmsDatabaseDriver.php

示例4: loadResultArray

 /**
  * Load an array of single field results into an array
  */
 function loadResultArray($numinarray = 0)
 {
     if (checkJversion() >= 2) {
         $result = $this->_db->loadColumn($numinarray);
     } else {
         $result = $this->_db->loadResultArray($numinarray);
     }
     return $this->_nullToArray($result);
 }
開發者ID:rogatnev-nikita,項目名稱:cloudinterpreter,代碼行數:12,代碼來源:cb.database.php


注:本文中的JDatabase::loadColumn方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。