|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #37958 Improved bind_param
Submitted: 2006-06-29 08:45 UTC Modified: 2017-04-24 08:07 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: danielrc at eresmas dot net Assigned:
Status: Wont fix Package: MySQLi related
PHP Version: 5.1.4 OS: Irrelevant
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.
Block user comment
Status: Assign to:
Bug Type:
From: danielrc at eresmas dot net
New email:
PHP Version: OS:


 [2006-06-29 08:45 UTC] danielrc at eresmas dot net
I'm looking for a way to do:

$sql = CALL procedure(?,?,?);
$stmt = $con->prepare($sql);

$types = { "i", "i" , "i" };
$vars = { "var1", "var2", "var3" };

for ($i=0; $i<3; $i++) {

Note: Yes, I know bind_param() deprecated. stmt_bind_param() is the right way.

Reproduce code:
I can do:

$sql = CALL procedure(?,?,?);
$stmt = $con->prepare($sql);
$stmt->bind_param("iii", $var1, $var2, $var3);

But i can't do: -I get the error about not enought params for the procedure 3 expected 1 provided.-

$stmt->bind_param("i", $var1);
$stmt->bind_param("i", $var2);
$stmt->bind_param("i", $var3);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-05-01 02:11 UTC]
-Package: Feature/Change Request +Package: MySQLi related -Operating System: WinXP SP2 +Operating System: Irrelevant
 [2017-04-24 08:07 UTC]
-Status: Open +Status: Wont fix
 [2017-04-24 08:07 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Jun 09 22:03:37 2023 UTC