I have a PDO
query like this.
$query=$this->con->prepare('SELECT ? FROM ? ');
$query->execute(array($rows,$table));
/*$rows="*"; $table="category";*/
Everything is OK in the coding. But when PDO executing my query it parse it as,
SELECT '*' FROM 'category'
So it's a wrong SQL statement.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''category'' at line 1
Please help me. How to prevent PDO from inserting the '
s.