|
-
Jun 24th, 2008, 11:57 PM
#1
Thread Starter
Frenzied Member
Move to first record after loop
I do a query, and loop through the result and build a select list from it.
Thing is I wan to use this result over and over so just want to get it once, then do a "while($row = $results->fetch_object()) " several times.
But seems after you did it once you cant loop through the results again.
Remember sth in .net and vb6 like recordset.movefirst....is there and equivalent in php / mysqli ?
Last edited by StrangerInBeijing; Jun 25th, 2008 at 09:08 PM.
-
Jun 25th, 2008, 04:43 AM
#2
Addicted Member
Re: Move to first record after loop
$results->data_seek(0); before the next loop.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|