Пример #1
0
 /**
  * Executa a query
  * @return array de resultados
  */
 public function execute($mount_array = true, $query = NULL)
 {
     if (Ibe_Database::getConn()) {
         if (!isset($query) || !is_string($query)) {
             $query = $this->getQuery();
         }
         $result = Ibe_Database::execute($query);
         if ($mount_array) {
             $array_results = array();
             while ($obj = mysql_fetch_object($result)) {
                 $array_results[] = $obj;
             }
         } else {
             $array_results = $result;
         }
     } else {
         throw new Ibe_Exception(Ibe_Exception::ERRO_MYSQL);
     }
     return $array_results;
 }