MySQL Forums
Forum List  »  PHP

Re: How do you call a stored procedure from PHP ...
Posted by: Georg Richter
Date: March 02, 2006 01:02PM

Peter,

I don't think that this is documented in PHP or MySQL documentation (if yes, I will fix that).
It's a hack. Try to send a a simple statement and check the errorcode, you should get an error like 'packets out of order'.

$result = mysql_query( "CALL ShowTables('test')" )
or die( mysql_error() );
/* process result */
mysql_free_result($result);

$result= mysql_query("SELECT 'FOO' FROM DUAL")
or die( mysql_error() ); /* <-- packets out of order, there is still a 2nd resultset (errorcode from SP) */

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.