コード例 #1
0
 /**
  * Gets error number
  *
  * @deprecated 2.0 (use exceptions instead)
  *
  * @return int The error number for the most recent query
  */
 public function getErrorNum()
 {
     return $this->_db->getErrorNum();
 }
コード例 #2
0
ファイル: admin.acctexp.php プロジェクト: Ibrahim1/aec
 public function getRows($class = null)
 {
     // get the subset (based on limits) of records
     $query = 'SELECT *' . ' FROM #__acctexp_' . $this->table . $this->getConstraints() . $this->getOrdering() . $this->getLimit();
     $this->db->setQuery($query);
     $rows = $this->db->loadObjectList();
     if ($this->db->getErrorNum()) {
         echo $this->db->stderr();
         return false;
     }
     if ($class) {
         foreach ($rows as $k => $obj) {
             $rows[$k] = new $class();
             $rows[$k]->load($obj->id);
         }
     }
     return $rows;
 }