Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 622791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:01:21+00:00 2026-05-13T19:01:21+00:00

I am running a query with a mysql stored procedure : $AddProf_qr = mysql_query(call

  • 0

I am running a query with a mysql stored procedure :

$AddProf_qr = mysql_query("call AddStudent('$d_Pass', '$d_Titl', '$d_Firs', '$d_Midd',  '$d_Last', '$d_Addr', '$d_City', '$d_Stat', '$d_County',  '$d_Zipc', $d_Gend, '$d_Birh', '$d_Phom', '$d_Phoh', '$d_Phoo', '$d_Email', '$d_Webs', '$d_Natn', '$d_Profsn',  '$d_Compny', '$d_Desig', $d_ProfAcc)", $this->c_remote) or die ("first call" . mysql_error($this->c_remote));

I am supposed to get just one result from the call : @@IDENTITY = a number;

$AP_result = mysql_fetch_array($AddProf_qr);
$CurrentSID = $AP_result['@@IDENTITY'];

which works fine. but when i run another mysql update query right after this, it gives an error saying :

Error: 2014 (CR_COMMANDS_OUT_OF_SYNC)
Message: Commands out of sync; you can’t run this command now

i have tried inserting :

mysql_free_result($AddProf_qr);

but still the same.

The MySQL call executes fine also
the rest of the script runs without issues the above is commented out. but they don’t run at the same time. My best guess is, the call is doing something that’s messing this up.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:01:21+00:00Added an answer on May 13, 2026 at 7:01 pm

    Your stored procedure is returning multiple resultsets. See this post

    Solution?

    • Use mysqli_multi_query
    • Stop using the ancient mysql library – the i in mysqli stands for “Improved” – with good reason.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm seeing very poor query performance when running a stored routine on a MySQL
I'm running SQL query for MySQL server with ... where name in (term1,term2,term3) I
I'm running an MySQL query that returns results based on location. However I have
I have the following mysql query which I am running with php like so.
I'm new to MySQL, and I'm running this query, SELECT item_id,amount FROM db.invoice_line WHERE
I'm running Mysql 5.0.77 and I'm pretty sure this query should work? SELECT *
the current SQL query works fine locally on MAMP 1.8.4 running MySQL 5.1.37. SELECT
Right. So I've created a stored procedure in a MySQL DB which happens to
I want to be able to get some output from mysql stored procedure within
I'm running a MYSQL query in two steps. First, I get a list of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.