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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
37 - 34 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 23:01:26 2024 UTC