Moving Through recordsets
Posted: Tue Jun 28, 2005 10:33 am
What are the commands to move through a MySQL recordset? I know for asp it is things like recset.movenext, recset.movefirst, recset.movelast, recset.moveprev I was wondering how to move through a recordset other than using a while loop which doesn't work too well if you want to build a table with multiple columns of the same data from the database.
Also how do i tell the loop to stop in asp i could do a recset.eof to tell when i am at the end of a recordset.
The only way i know to loop through a recset in php is:
There has got to be better and more ways.
Thanks,
Dan
Also how do i tell the loop to stop in asp i could do a recset.eof to tell when i am at the end of a recordset.
The only way i know to loop through a recset in php is:
Code: Select all
<?while ($row = mysql_fetch_array ($r))?>Thanks,
Dan