Hi,
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

Recommended Answers

All 3 Replies

nice post
<URL SNIPPED>xperts

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.