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 running a MYSQL query in two steps. First, I get a list of
Right. So I've created a stored procedure in a MySQL DB which happens to
im running bellow query to fetch from 3 mysql tables and it works fine
I am running this MySQL query against my db that contains a lot of
I'm running a query in php/mysql that joins several tables and I'm trying to
I'm running the following query but $new returns 0 : $count = mysql_query(SELECT COUNT(*)
I am running a query against a providex database that we use in MAS
I currently have the query running on Postgres: SELECT * FROM addenda.users WHERE users.username
My Server is located in US and I am running a query against it.
I'm running an SQL query against a mainframe DB2 database using the OdbcDataReader class

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.