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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 02 13:01:30 2025 UTC