I am new to MYSQL stored procedure. Getting problem in SP execution through PHP.

How can we execute multiple procedures using mysql and php.

I made connection using
mysql_pconnect("host", "user", "pwd", 1, 131072);
and have 3 procedures one for select, insert and update. If i am going to execute two procedures on same page i am getting "Command out of sync; you cannot run this command now". Otherwise running successfully.

Also i made result set free. But still getting above error.

I have googled a lot for this and came to know that we can execute only one procedure with one connection at a time with MYSQL. Is this true?

Thanks for all help

9 Years
Discussion Span
Last Post by sunilsinha

Thank You for your reply.

By doing so, issue resolved.
But suppose in one page we need to execute 5-6 queries using SP for retrieving different data. Then each time we need to connect and disconnect DB.
My query is to what extent DB performance will effect by doing so?

Thanks for all help.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.