|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-08-28 09:45 UTC] andrey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
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.