includes/dbal.php
changeset 953 323c4cd1aa37
parent 940 645727469415
child 973 451141c834fe
equal deleted inserted replaced
952:d52dfa1f08da 953:323c4cd1aa37
   425   {
   425   {
   426     return @mysql_insert_id();
   426     return @mysql_insert_id();
   427   }
   427   }
   428   
   428   
   429   function fetchrow($r = false) {
   429   function fetchrow($r = false) {
   430     if(!$this->_conn) return false;
   430     if ( !$this->_conn )
   431     if(!$r) $r = $this->latest_result;
   431       return false;
   432     if(!$r) $this->_die('$db->fetchrow(): an invalid MySQL resource was passed.');
   432     
       
   433     if ( !$r )
       
   434       $r = $this->latest_result;
       
   435     
       
   436     if ( !$r )
       
   437       $this->_die('$db->fetchrow(): an invalid MySQL resource was passed.');
       
   438     
   433     $row = mysql_fetch_assoc($r);
   439     $row = mysql_fetch_assoc($r);
       
   440     /*
       
   441     if ( empty($row) )
       
   442     {
       
   443       $GLOBALS['do_gzip'] = false;
       
   444       echo '<pre>' . enano_debug_print_backtrace(true) . '</pre>';
       
   445     }
       
   446     */
       
   447     
   434     return integerize_array($row);
   448     return integerize_array($row);
   435   }
   449   }
   436   
   450   
   437   function fetchrow_num($r = false) {
   451   function fetchrow_num($r = false) {
   438     if(!$r) $r = $this->latest_result;
   452     if(!$r) $r = $this->latest_result;