note 83425 deleted from mysqli-stmt.bind-param by danbrown
| From: | danbrown@php.net | Date: | Wed, 25 Feb 2009 14:14:34 +0000 |
| Subject: | note 83425 deleted from mysqli-stmt.bind-param by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-151117@lists.php.net to get a copy of this message | ||
Note Submitter: dams at php dot net
----
don't try to bin twice the same variable, as it won't work.
$query = "select * from table where col1 = ? or col2 = ?";
mysqli_bind_param($stmt, "ss", $arg, $arg);
You have to use a another variable :
$query = "select * from table where col1 = ? or col2 = ?";
$arg2 = $arg;
mysqli_bind_param($stmt, "ss", $arg, $arg2);