php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69283 bindParam ouput param don't work
Submitted: 2015-03-24 06:18 UTC Modified: 2017-10-24 14:19 UTC
From: 630969128 at qq dot com Assigned:
Status: No Feedback Package: PDO MySQL
PHP Version: 5.6.7 OS: win8.1
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 — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
43 - 36 = ?
Subscribe to this entry?

 
 [2015-03-24 06:18 UTC] 630969128 at qq dot com
Description:
------------
---
From manual page: http://www.php.net/pdo.prepared-statements
---
Example #5 don't work!
in example #5,a vraiable $value didn't get a return value after exec procedure.
p.s.:in procedure,output param do be changed.
pleace check it.



Test script:
---------------
$stmt = $dbh->prepare("CALL ggg(@?)");
$value = 'hello';
$stmt->bindParam(1, $value, PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT, 4000);

// 调用存储过程,will change val ,for example : set t = "3"; (t is procedure's output  param)
$stmt->execute();

print "$value";


Expected result:
----------------
'3'

Actual result:
--------------
'hello'

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-21 02:45 UTC] ezequielcicala at hotmail dot com
That's not what the manual says. You added a '@' before the '?'.
 [2017-10-24 14:19 UTC] yunosh@php.net
-Status: Open +Status: No Feedback
 [2017-10-24 14:19 UTC] yunosh@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.


 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Sep 20 05:03:36 2021 UTC