note 64226 added to function.pdostatement-bindparam
| From: | Filofox at osu1 dot php dot net | Date: | Mon, 10 Apr 2006 10:09:55 +0000 |
| Subject: | note 64226 added to function.pdostatement-bindparam | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-107693@lists.php.net to get a copy of this message | ||
Do not try to use the same named parameter twice in a single SQL statement, for example
$sql = 'SELECT * FROM some_table WHERE some_value > :value OR some_value < :value';
$stmt = $dbh->prepare($sql);
$stmt->execute( array( ':value' => 3 ) );
...this will return no rows and no error -- you must use each parameter once and only once.
Apparently this is expected behavior (according to this bug report: http://bugs.php.net/bug.php?id=33886) because of
portability issues.
----
Server IP: 84.18.202.180
Probable Submitter: 82.152.82.150
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.pdostatement-bindparam.php
Edit -- http://master.php.net/note/edit/64226
Del: integrated -- http://master.php.net/note/delete/64226/integrated
Del: useless -- http://master.php.net/note/delete/64226/useless
Del: bad code -- http://master.php.net/note/delete/64226/bad+code
Del: spam -- http://master.php.net/note/delete/64226/spam
Del: non-english -- http://master.php.net/note/delete/64226/non-english
Del: in docs -- http://master.php.net/note/delete/64226/in+docs
Del: other reasons-- http://master.php.net/note/delete/64226
Reject -- http://master.php.net/note/reject/64226
Search -- http://master.php.net/manage/user-notes.php