Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick mysql_fetch_assoc question 1

Status
Not open for further replies.

Lochness30

Programmer
Jun 9, 2004
23
CA
Just wondering, if I have a block of code to go through a list of records. Say
Code:
while ($row = mysql_fetch_assoc($result)) {
        echo $row["userid"];
        echo $row["fullname"];
        echo $row["userstatus"];
    }
Is there a way to reset the list, so I can go through it again? Or do I have to reissue the original select statement??

Thanks
 
Generally speaking:
It is not efficient to go through a list multiple times. Try to optimize your code that you just need to iterate the result set once.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top