includes/dbal.php
changeset 770 62fed244fa1c
parent 685 17ebe24cdf85
child 798 ddfc1b554a08
equal deleted inserted replaced
769:1946d845bb25 770:62fed244fa1c
   419     if(!$this->_conn) return false;
   419     if(!$this->_conn) return false;
   420     if(!$r) $r = $this->latest_result;
   420     if(!$r) $r = $this->latest_result;
   421     if(!$r) $this->_die('$db->fetchrow(): an invalid MySQL resource was passed.');
   421     if(!$r) $this->_die('$db->fetchrow(): an invalid MySQL resource was passed.');
   422     $row = mysql_fetch_assoc($r);
   422     $row = mysql_fetch_assoc($r);
   423     $this->disable_errorhandler();
   423     $this->disable_errorhandler();
   424     return $row;
   424     return integerize_array($row);
   425   }
   425   }
   426   
   426   
   427   function fetchrow_num($r = false) {
   427   function fetchrow_num($r = false) {
   428     $this->enable_errorhandler();
   428     $this->enable_errorhandler();
   429     if(!$r) $r = $this->latest_result;
   429     if(!$r) $r = $this->latest_result;
   430     if(!$r) $this->_die('$db->fetchrow(): an invalid MySQL resource was passed.');
   430     if(!$r) $this->_die('$db->fetchrow(): an invalid MySQL resource was passed.');
   431     $row = mysql_fetch_row($r);
   431     $row = mysql_fetch_row($r);
   432     $this->disable_errorhandler();
   432     $this->disable_errorhandler();
   433     return $row;
   433     return integerize_array($row);
   434   }
   434   }
   435   
   435   
   436   function numrows($r = false) {
   436   function numrows($r = false) {
   437     $this->enable_errorhandler();
   437     $this->enable_errorhandler();
   438     if(!$r) $r = $this->latest_result;
   438     if(!$r) $r = $this->latest_result;
  1163     if(!$this->_conn) return false;
  1163     if(!$this->_conn) return false;
  1164     if(!$r) $r = $this->latest_result;
  1164     if(!$r) $r = $this->latest_result;
  1165     if(!$r) $this->_die('$db->fetchrow(): an invalid MySQL resource was passed.');
  1165     if(!$r) $this->_die('$db->fetchrow(): an invalid MySQL resource was passed.');
  1166     $row = pg_fetch_assoc($r);
  1166     $row = pg_fetch_assoc($r);
  1167     $this->disable_errorhandler();
  1167     $this->disable_errorhandler();
  1168     return $row;
  1168     return integerize_array($row);
  1169   }
  1169   }
  1170   
  1170   
  1171   function fetchrow_num($r = false) {
  1171   function fetchrow_num($r = false) {
  1172     $this->enable_errorhandler();
  1172     $this->enable_errorhandler();
  1173     if(!$r) $r = $this->latest_result;
  1173     if(!$r) $r = $this->latest_result;
  1174     if(!$r) $this->_die('$db->fetchrow(): an invalid MySQL resource was passed.');
  1174     if(!$r) $this->_die('$db->fetchrow(): an invalid MySQL resource was passed.');
  1175     $row = pg_fetch_row($r);
  1175     $row = pg_fetch_row($r);
  1176     $this->disable_errorhandler();
  1176     $this->disable_errorhandler();
  1177     return $row;
  1177     return integerize_array($row);
  1178   }
  1178   }
  1179   
  1179   
  1180   function numrows($r = false) {
  1180   function numrows($r = false) {
  1181     $this->enable_errorhandler();
  1181     $this->enable_errorhandler();
  1182     if(!$r) $r = $this->latest_result;
  1182     if(!$r) $r = $this->latest_result;