#45099 [Opn]: PROCEDURE xxx can't return a result set in the given context(same as in mysqli)
| From: | jani@php.net | Date: | Mon, 26 May 2008 23:52:13 +0000 |
| Subject: | #45099 [Opn]: PROCEDURE xxx can't return a result set in the given context(same as in mysqli) | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-851@lists.php.net to get a copy of this message | ||
ID: 45099
Updated by: jani@php.net
Reported By: carsten at brandt-henke dot de
Status: Open
-Bug Type: MySQL related
+Bug Type: Documentation problem
Operating System: Linux (all?)
PHP Version: 5.2.6
New Comment:
From bug #40085: "mysql extension doesn't support advanced features
like prepared statements and stored procedures. For using these features
you have to use mysqli extension."
That's pretty clear. This really should be documented -> reclassified.
Previous Comments:
------------------------------------------------------------------------
[2008-05-26 22:27:28] carsten at brandt-henke dot de
Description:
------------
same problem as described here for mysqli (
http://bugs.php.net/bug.php?id=42548 ) seems to
exist in the mysql
extension. I get the same error message when trying to call a PROCEDURE
in MySQL.
The Error-Message:
1312 - PROCEDURE databsename.select_user_login can't return a result
set in the given context )
Reproduce code:
---------------
procedure has been added by sql-query:
DELIMITER |
CREATE PROCEDURE
select_user_login
(
IN v_email varchar(128),
IN v_password varchar(32)
)
BEGIN
SELECT user_id, username FROM user WHERE user.email =
v_email;
END|
DELIMITER ;
-------
php-code:
$res = mysql_query("CALL select_user_login('$email', '$pw')");
Expected result:
----------------
well, no error ;-)
Actual result:
--------------
MySQL-Error
1312 - PROCEDURE databsename.select_user_login can't return a result
set in the given context )
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45099&edit=1