Jump to content

Commands out of sync; you can't run this command now


Recommended Posts

I'm using mysqli_query, which defaults to using mysqli_store_result, and i'm running multiple SPs on every page, but yet for this ONE command, anything after it is throwing this error. I should not be getting this error, because i'm fine everywhere else, and my code is good, so i think that it has something to do with the command itself........... Anyone else ever had this problem, when they should NOT have had this problem?

 

If i put the next query BEFORE this statement, then it's fine, but any query after get's this error. The statement itself is fine also, and executes as expected.

 

Thanx

 

 

UPDATE: I'm an idiot. Sorry and thanx.

 

I always TRY to return SOMETHING from a procedure, to ensure that an error did not occur. So for example, if i did an insert statement, i would select true; when finished, so that my custom sql class knows that there was no critical error. Well, for this select procedure, my dumbass wasn't paying attention and selected true after selecting a result set, causing 2 of them to be returned. I knew there was nothing wrong with my code :D

 

Thanx guys, i hope this teaches someone else a lesson!

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.