note 68812 added to function.mysqli-fetch-array
| From: | travis at ignw dot com | Date: | Fri, 11 Aug 2006 15:54:06 +0000 |
| Subject: | note 68812 added to function.mysqli-fetch-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115801@lists.php.net to get a copy of this message | ||
With the older mysql functions, you could iterate through all the rows in your result set with:
<? while($row=mysql_fetch_array($result)){
dostuff;
} ?>
However, this functionality, at least in my experience, doesn't work with mysqli. This does:
<? $row = mysqli_fetch_array($result);
while(!is_null($row)){
dostuff;
$row = mysqli_fetch_array($result);
} ?>
----
Server IP: 216.194.113.175
Probable Submitter: 67.189.51.109
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.mysqli-fetch-array.php
Edit -- https://master.php.net/note/edit/68812
Del: integrated -- https://master.php.net/note/delete/68812/integrated
Del: useless -- https://master.php.net/note/delete/68812/useless
Del: bad code -- https://master.php.net/note/delete/68812/bad+code
Del: spam -- https://master.php.net/note/delete/68812/spam
Del: non-english -- https://master.php.net/note/delete/68812/non-english
Del: in docs -- https://master.php.net/note/delete/68812/in+docs
Del: other reasons-- https://master.php.net/note/delete/68812
Reject -- https://master.php.net/note/reject/68812
Search -- https://master.php.net/manage/user-notes.php