#48073 [Opn->Bgs]: PDO bindParam

From: Date: Mon, 27 Apr 2009 08:41:13 +0000
Subject: #48073 [Opn->Bgs]: PDO bindParam
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-136349@lists.php.net to get a copy of this message
ID: 48073 Updated by: johannes@php.net Reported By: admin at wdfa dot co dot uk -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: na PHP Version: 5.2.9 New Comment: This is not possible with prepared statements, as the database server won't be able to create the query plan without knowing the field names. Previous Comments: ------------------------------------------------------------------------ [2009-04-25 00:46:15] admin at wdfa dot co dot uk Description: ------------ Hi, Would it be possible to allow pdo->bindParam / pdo->bindValue to bind to column names. i.e. <?php $sql="UPDATE table SET :name='test'"; $stm=$db->prepare($sql); $stm->bindParam(":name","column",PDO::PARAM_STR); $stm->execute(); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48073&edit=1

« previous php.bugs (#136349) next »