Req #37958 [Opn->Wfx]: Improved bind_param

From: Date: Mon, 24 Apr 2017 08:07:13 +0000
Subject: Req #37958 [Opn->Wfx]: Improved bind_param
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208730@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=37958&edit=1 ID: 37958 Updated by: fjanisze@php.net Reported by: danielrc at eresmas dot net Summary: Improved bind_param -Status: Open +Status: Wont fix Type: Feature/Change Request Package: MySQLi related Operating System: Irrelevant PHP Version: 5.1.4 Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: ------------------------------------------------------------------------ [2006-06-29 08:45:25] danielrc at eresmas dot net Description: ------------ 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++) { $stmt->bind_param(types[$i],$$vars[$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); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=37958&edit=1

« previous php.bugs (#208730) next »