Jump to content

Calling mysql stored procedures from php...


panda_df

Recommended Posts

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 now

my question is what does this mean, and why can't i run that command now?
Link to comment
https://forums.phpfreaks.com/topic/28453-calling-mysql-stored-procedures-from-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.