|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49370 Missing constants MYSQL_CLIENT_MULTI_RESULTS
Submitted: 2009-08-26 11:05 UTC Modified: 2009-08-28 09:45 UTC
From: dg at artegic dot de Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.2.10 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: dg at artegic dot de
New email:
PHP Version: OS:


 [2009-08-26 11:05 UTC] dg at artegic dot de
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:


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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-28 09:45 UTC]
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.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jun 19 20:01:31 2024 UTC