note 15688 added to function.reset
| From: | tac at smokescreen dot org | Date: | Wed, 26 Sep 2001 15:42:09 +0000 |
| Subject: | note 15688 added to function.reset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18324@lists.php.net to get a copy of this message | ||
Related to resetting an array is resetting a result set back to the beginning, so you can loop
through it again. To do that, use
mysql_data_seek($result, 0)
I use this often when debugging -- do a query, print it out, then loop through it a second time to
process. I'm adding this here under Reset because that's where I originally looked for
this functionality.
--
http://www.php.net/manual/en/function.reset.php
http://master.php.net/manage/user-notes.php?action=edit+15688
http://master.php.net/manage/user-notes.php?action=delete+15688
http://master.php.net/manage/user-notes.php?action=reject+15688