php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #69894 PDO stored procedure out parameters don't work
Submitted: 2015-06-21 05:55 UTC Modified: 2016-11-11 19:32 UTC
Votes:2
Avg. Score:2.5 ± 0.5
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: ezequielcicala at hotmail dot com Assigned: adambaratz (profile)
Status: Closed Package: PDO Core
PHP Version: 5.6.10 OS: Windows 7
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ezequielcicala at hotmail dot com
New email:
PHP Version: OS:

 

 [2015-06-21 05:55 UTC] ezequielcicala at hotmail dot com
Description:
------------
---
From manual page: http://www.php.net/pdo.prepared-statements
---

As per the current implementation, out parameters won't work. Trying to execute the code in examples 4 and 5 will throw the error:

"SQLSTATE[42000]: Syntax error or access violation: 1414 OUT or INOUT argument 3 for routine test_table.baz is not a variable or NEW pseudo-variable in BEFORE trigger".

Even when setting the attribute PDO::ATTR_EMULATE_PREPARES to 0, the bound variables won't be updated with the out parameters.
This issue has been reported and explained here: https://bugs.mysql.com/bug.php?id=69206 and here: https://bugs.php.net/bug.php?id=64640.

Expected result:
----------------
Execution of the stored procedure.

Actual result:
--------------
SQLSTATE[42000]: Syntax error or access violation: 1414 OUT or INOUT argument 3 for routine test_table.baz is not a variable or NEW pseudo-variable in BEFORE trigger

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-11-11 19:32 UTC] adambaratz@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: adambaratz
 [2016-11-11 19:32 UTC] adambaratz@php.net
Closing, since the referenced documentation at present only has three examples. None of the remaining examples create a stored procedure.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Aug 20 18:01:31 2019 UTC