note 92673 added to function.mysql-fetch-array
| From: | buddy at databoysoftware dot com | Date: | Mon, 03 Aug 2009 17:24:32 +0000 |
| Subject: | note 92673 added to function.mysql-fetch-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-159054@lists.php.net to get a copy of this message | ||
In the note entered by Typer85, concerning the use of mysql_data_seek(), it should be noted that
there are two parameters, both of which are required.
If you have already iterated through a result array (for instance, using mysql_fetch_array()), and
have a need to start from the top, the proper syntax is:
mysql_data_seek({result set},{record#})
EG:
mysql_data_seek($result,0)
("0" represents the first record in the array.)
This will reset your result to the top of the array so that you can then re-process with
while($row = mysql_fetch_array($result)) or other array processing.
----
Server IP: 64.71.164.2
Probable Submitter: 69.76.13.31
----
Manual Page -- http://www.php.net/manual/en/function.mysql-fetch-array.php
Edit -- https://master.php.net/note/edit/92673
Del: integrated -- https://master.php.net/note/delete/92673/integrated
Del: useless -- https://master.php.net/note/delete/92673/useless
Del: bad code -- https://master.php.net/note/delete/92673/bad+code
Del: spam -- https://master.php.net/note/delete/92673/spam
Del: non-english -- https://master.php.net/note/delete/92673/non-english
Del: in docs -- https://master.php.net/note/delete/92673/in+docs
Del: other reasons-- https://master.php.net/note/delete/92673
Reject -- https://master.php.net/note/reject/92673
Search -- https://master.php.net/manage/user-notes.php