放置"来自?"在PDO中不起作用

时间:2017-03-29 16:26:07

标签: php pdo mariadb

为什么要放置"?"在" FROM"之前不起作用,而在其他地方它的作品?

query = "SELECT nome_cliente 
         FROM ?
         ORDER BY nome_cliente";

$rows = $this->db->prepare($query);
$rows->execute([$id]);

它给出的错误是:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '? ORDER BY nome_cliente' at line 1

0 个答案:

没有答案