Jump to content

[SOLVED] Query Problems


hukadeeze

Recommended Posts

I'm running into problems using a single query more than once during the same request. I execute the query, pass it to one function where it is looped through, then pass it to another function where it is looped through again. When I loop through it the second time nothing is output. I checked from inside the second function to see if all the records were there, and they were. The loop is even executing the correct amount of times. It's just not outputting anything. Any idea?

Link to comment
https://forums.phpfreaks.com/topic/51925-solved-query-problems/
Share on other sites

When you loop all the way through a query, does the pointer reset, or stop at the end?

 

You don't loop through a query, you loop through a result. And yes, once you've looped all the way through the result it is not reset. You can use mysql_data_seek to move the result pointer back to the start.

Link to comment
https://forums.phpfreaks.com/topic/51925-solved-query-problems/#findComment-255988
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.