panda_df Posted November 25, 2006 Share Posted November 25, 2006 i made a short piece of code below$db = new mysqli($db_host, $db_user, $db_pass) or die('trying. to. connect.');$db->select_db($db_name) or die('cannot select database');printf("Host information: %s\n", $db->host_info . ' | ');$result = $db->multi_query('select * from menus') or die('dropped dead while "select query"');$q = "CALL aa()";$result = $db->query($q) or die("dropped dead while calling stored procedure. | Errormessage : " . $db->error); $db->close();after running it, it results in the following error message: Host information: localhost via TCP/IP | dropped dead while calling stored procedure. | Errormessage : Commands out of sync; you can't run this command nowmy question is what does this mean, and why can't i run that command now? Quote Link to comment https://forums.phpfreaks.com/topic/28453-calling-mysql-stored-procedures-from-php/ Share on other sites More sharing options...
printf Posted November 25, 2006 Share Posted November 25, 2006 Are you freeing the the result from the first query [b]$db->multi_query(), with [b]mysqli_free_result()[/b][/b] before calling the stored procedures query?printf Quote Link to comment https://forums.phpfreaks.com/topic/28453-calling-mysql-stored-procedures-from-php/#findComment-130237 Share on other sites More sharing options...
panda_df Posted November 26, 2006 Author Share Posted November 26, 2006 I wasn't. But it made no difference. It didn't work with or without it. Anyway the problem is solved now. I restarted the browser several times (restarting it just once did not help). Now it works with or without it :) Quote Link to comment https://forums.phpfreaks.com/topic/28453-calling-mysql-stored-procedures-from-php/#findComment-130617 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.