当前位置: 首页>>代码示例>>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;未经允许,请勿转载。