ID:               49370
 Updated by:       [email protected]
 Reported By:      dg at artegic dot de
-Status:           Open
+Status:           Bogus
 Bug Type:         MySQL related
 Operating System: *
 PHP Version:      5.2.10
 New Comment:

But ext/mysql doesn't have means of using multiple result sets, and a
SP call will produce at least 1 result set (the status result set) and
probably more, if you perform selects in it. For this purpose you need
to use ext/mysqli.


Previous Comments:
------------------------------------------------------------------------

[2009-08-26 11:05:26] dg at artegic dot de

Description:
------------
When dealing with MySQL STORED PROCEDURES it's often necessary to set 
flags as a parameter for mysql_connect which are not (yet?) defined in

the current versions:

CLIENT_MULTI_STATEMENT (65536) and
CLIENT_MULTI_RESULTS (131072)

Otherwise the application will return a "PROCEDURE xxx can't return a 
result set in the given context" error, even if a CALL from phpMyAdmin

or any other client is working without problems.


Reproduce code:
---------------
  mysql_connect ($host, $user, $pw, $newlink);
  mysql_unbuffered_query ('CALL myproc()');

won't work, but

  mysql_connect ($host, $user, $pw, $newlink, 131072)
  mysql_unbuffered_query ('CALL myproc()');

will work just as expected.




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49370&edit=1

Reply via email to