Reset mysql_result offet

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ast3r3x
Forum Commoner
Posts: 95
Joined: Thu Aug 19, 2004 8:36 pm

Reset mysql_result offet

Post by ast3r3x »

Is there a way to reset the offset in a mysql result without running the query again? I'd like to be able to reset it to the beginning after running mysql_fetch_row, but haven't been able to figure out how. I tried reset($whatever) but it didn't work...then again I figured it wouldn't.

Thanks in advance, this is driving me crazy, and it's not even because I need to do it, but because I want to.
User avatar
SystemWisdom
Forum Commoner
Posts: 69
Joined: Sat Mar 26, 2005 5:54 pm
Location: A Canadian South of the 49th Parallel

Post by SystemWisdom »

Example:

Code: Select all

mysql_data_seek( $result_set, 0 );
Reference:
mysql_data_seek()

I hope that helps! :)
ast3r3x
Forum Commoner
Posts: 95
Joined: Thu Aug 19, 2004 8:36 pm

Post by ast3r3x »

*sigh*

Thanks man :)

You know I was looking around, but by the name of that function, I thought it in no way would have anything to do with what I wanted. How ironically frustrating.
Post Reply