AAAA_database = JFactory::getDbo(); } public function setQuery($sql, $offset = 0, $limit = 0) { $this->_database->setQuery($sql, $offset, $limit); if (!$this->cur = $this->_database->query()) { $this->_error = $this->_database->getErrorMsg(); } } public function getRow() { if (!is_object($this->cur)) $array = mysql_fetch_object($this->cur); else $array = $this->cur->fetch_object(); if ($array) { return $array; } else { if (!is_object($this->cur)) mysql_free_result( $this->cur ); else $this->cur->free_result(); return false; } } public function getErrorMsg() { return $this->_error; } public function getNumRows() { return $this->_database->getNumRows($this->cur); } public function getQuery() { return $this->_database->getQuery(); } }