Re: How do you step through a database?
| From: | CJD | Date: | Mon, 13 Aug 2001 21:55:33 +0000 |
| Subject: | Re: How do you step through a database? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-8823@lists.php.net to get a copy of this message | ||
while ($item=mysql_fetch_array($result)) {
print $item[title];
}
The loop will continue until the result reaches the end then stops. Also
works for $result with no results in it (skips the loop) and you can use
mysql_data_seek($result,0);
to reset the counter to the top ready for the next loop
"Jeff Howard" <jeff.howard@berry-hinckley.com> wrote in message
news:20010813194146.57831.qmail@pb1.pair.com...
> I've used Visual Basic for years and have never had a problem with this
> issue. I can use the following code to do this:
>
> do until (rs.eof)
> ..
> rs.movenext
> loop
>
> Does anybody know how to step through a database in PHP?
>
>
>
>