note 65509 added to function.pdostatement-bindparam

From: Date: Tue, 02 May 2006 13:12:17 +0000
Subject: note 65509 added to function.pdostatement-bindparam
Groups: php.notes 
Request: Send a blank email to php-notes+get-110360@lists.php.net to get a copy of this message
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). ---- Server IP: 212.124.37.9 Probable Submitter: 87.123.219.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/65509 Del: integrated -- http://master.php.net/note/delete/65509/integrated Del: useless -- http://master.php.net/note/delete/65509/useless Del: bad code -- http://master.php.net/note/delete/65509/bad+code Del: spam -- http://master.php.net/note/delete/65509/spam Del: non-english -- http://master.php.net/note/delete/65509/non-english Del: in docs -- http://master.php.net/note/delete/65509/in+docs Del: other reasons-- http://master.php.net/note/delete/65509 Reject -- http://master.php.net/note/reject/65509 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#110360) next »