Problem
I get a PDO syntax error when running a PDO statement where the table name is parametrized, like in
$sql = 'DELETE FROM :table_name';
$query = $this->db->prepare($sql);
$query->execute(array(':table_name' => "mytable"));
I could reproduce the problem with SELECT etc., so it's a general issue. I tried to write it with backticks, with database name in front of it, a combination of both etc, nothing works.
Question
How to do this ?