best way to iterate through DB_Result the second time around?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Iterating over a result set is eaasy the first time;

  while( $group_data = $result->fetchRow( DB_FETCHMODE_ASSOC ) ) 
  {
 	blah.......
  }


How come DB_Result doesn't have a reset() function so you can iterate over 
the result set a second time without having to resort to this sort of thing?

for( $i = 0; $i < $result->numRows(); $i++ ) // Have to iterate through 					 
                                              // result set on the second pass
{
        $group_data = $result->fetchRow( DB_FETCHMODE_ASSOC, $i );
	blah......
}

Brad


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux