PDO : Select using a prepared statement returns column name
Hey guys, question if this is possible or not, maybe I'm not doing something right. I'm trying to use a prepared statement where the column is prepared i.e. SELECT ? FROM users Now this normally works if I put SELECT id FROM users But doing the first statement, the value is the column name. id = id 0 = 0 What am I doing wrong, or is this possible? Thanks Galen No you can't bind column names or table names. Here's more info Escaping column names in PDO statements A prepared statement can only replace value in the statement not field nor column name, this is because prepared statement are kind