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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.