I run a query with the 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 should get only one result of the call: @@ IDENTITY = number;
$AP_result = mysql_fetch_array($AddProf_qr); $CurrentSID = $AP_result['@@IDENTITY'];
which works great. but when I run another mysql update request right after that, it gives an error message:
Error: 2014 (CR_COMMANDS_OUT_OF_SYNC) Message: commands are not synchronized; you cannot run this command now
I tried to insert:
mysql_free_result($AddProf_qr);
but still the same.
The MySQL call runs fine as well, the rest of the script works without the problems described above. but they do not work at the same time. My best guess is, the challenge is doing something that messed it up.
php mysql stored-procedures
DMin Feb 22 '10 at 23:38 2010-02-22 23:38
source share