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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mysql_fetch_array, starting over

Status
Not open for further replies.

dwessell

Programmer
Jan 26, 2006
114
US
When using mysql_fetch_array, if I loop through the contents of it, to the end, say:

while($row = mysql_fetch_array($result,MYSQL_NUM) ){
$gameUpdateQuery = "UPDATE GameInformation SET State = 1 WHERE GameNumber = $row[0]";
mysql_query($gameUpdateQuery);
}

How can I reset that pointer, so that it's back at the beginning, as if I had never iterated through the array?

Thanks
David
 
Ah.. I think I found it:

mysql_data_seek($result,0);

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top