includes/dbal.php
changeset 374 5c740e430a05
parent 352 9d7225c0db6d
child 424 f58e0b6e9c22
equal deleted inserted replaced
373:5c6e09bc7d69 374:5c740e430a05
   460     if(!$result)
   460     if(!$result)
   461     {
   461     {
   462       $this->disable_errorhandler();
   462       $this->disable_errorhandler();
   463       return null;
   463       return null;
   464     }
   464     }
   465     mysql_free_result($result);
   465     @mysql_free_result($result);
   466     $this->disable_errorhandler();
   466     $this->disable_errorhandler();
   467     return null;
   467     return null;
   468   }
   468   }
   469   
   469   
   470   function close() {
   470   function close() {
   480   function sql_freeresult($r = false)
   480   function sql_freeresult($r = false)
   481   {
   481   {
   482     if(!$this->_conn) return false;
   482     if(!$this->_conn) return false;
   483     if(!$r) $r = $this->latest_result;
   483     if(!$r) $r = $this->latest_result;
   484     if(!$r) $this->_die('$db->fetchrow(): an invalid MySQL resource was passed.');
   484     if(!$r) $this->_die('$db->fetchrow(): an invalid MySQL resource was passed.');
   485     mysql_free_result($r);
   485     @mysql_free_result($r);
   486   }
   486   }
   487   function sql_numrows($r = false)
   487   function sql_numrows($r = false)
   488   {
   488   {
   489     if(!$this->_conn) return false;
   489     if(!$this->_conn) return false;
   490     if(!$r) $r = $this->latest_result;
   490     if(!$r) $r = $this->latest_result;
  1206     if(!$result)
  1206     if(!$result)
  1207     {
  1207     {
  1208       $this->disable_errorhandler();
  1208       $this->disable_errorhandler();
  1209       return null;
  1209       return null;
  1210     }
  1210     }
  1211     pg_free_result($result);
  1211     @pg_free_result($result);
  1212     $this->disable_errorhandler();
  1212     $this->disable_errorhandler();
  1213     return null;
  1213     return null;
  1214   }
  1214   }
  1215   
  1215   
  1216   function close() {
  1216   function close() {