Show
Ignore:
Timestamp:
12/06/2007 08:15:37 PM (13 months ago)
Author:
Shadowhand
Message:

Changes to core:

  • date::timestamp() variable name typo
  • form::input() no longer puts an id on array-keyed inputs
  • form::label() no longer
  • added arr::unshift_assoc()
  • replace a couple of internal find_all() calls with load_result(TRUE) to avoid an extra method call
  • fixed a bug in Mysql_Result::result_array() that made multiple calls fail after the first call do to the pointer not being reset
  • small code and comment cleanups
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/drivers/Database_Mysql.php

    r1389 r1437  
    393393                } 
    394394 
    395                 while ($row = $fetch($this->result, $type)) 
    396                 { 
    397                         $rows[] = $row; 
    398                 } 
    399  
    400                 return $rows; 
     395                if (mysql_num_rows($this->result)) 
     396                { 
     397                        // Reset the pointer location to make sure things work properly 
     398                        mysql_data_seek($this->result, 0); 
     399 
     400                        while ($row = $fetch($this->result, $type)) 
     401                        { 
     402                                $rows[] = $row; 
     403                        } 
     404                } 
     405 
     406                return isset($rows) ? $rows : array(); 
    401407        } 
    402408 
     
    476482        { 
    477483                // Check to see if the requested offset exists. 
    478                 if (!$this->offsetExists($offset)) 
     484                if ( ! $this->offsetExists($offset)) 
    479485                        return FALSE; 
    480486