/** * 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; }
/** * 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); }
/** * 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)); }
/** * 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); }