Hello again,
in order to use Stored Procedures in MySQL through PHP you usually either use pdo or mysqli connections.
However if do not wish to redo your application connections and you don’t require any out parameters you can use “mysql_connect($host, $user, $password, true, 65536);” on connection, using the 65536 ( CLIENT_MULTI_STATEMENTS ) internal magic constant. But you can make only one stored procedure call per connection, and there is no support for OUT parameters. It is not currently documented, but can be found in the php header file.
If you do not use this connection method, you’ll get a “#1312 – PROCEDURE database.procedure can’t return a result set in the given context” error whenever you CALL a procedure that returns a result set.

![[del.icio.us]](http://techtrouts.com/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://techtrouts.com/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](http://techtrouts.com/wp-content/plugins/bookmarkify/facebook.png)
![[Twitter]](http://techtrouts.com/wp-content/plugins/bookmarkify/twitter.png)
July 6th, 2009 at 10:48 am
Thanks! I was able to make it work with PEAR DB.
In PEAR DB,you can modify connection string mysql.php under DB package and add that constant 65536. :)