note 65509 deleted from function.pdostatement-bindparam by bjori
| From: | bjori@php.net | Date: | Tue, 02 May 2006 13:50:17 +0000 |
| Subject: | note 65509 deleted from function.pdostatement-bindparam by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-110362@lists.php.net to get a copy of this message | ||
Note Submitter: hangy
Reason: useless
----
It doesn't seem to be possible to use a parameter as a field or smth. like in:
$stmt = $dbh->prepare('SELECT id, name FROM table WHERE :what LIKE :like');
$stmt->bindParam(':what', $what);
$stmt->bindParam(':like', $like);
$stmt->execute();
It would just return no rows or errors - just like when using a parameter twice.
Actually, it seems to be the same behaviour in the C API
(http://dev.mysql.com/doc/refman/4.1/en/mysql-stmt-prepare.html).