$orderby = 'title';
$order = 'ASC';
$stmt = $conn->prepare('SELECT f.id, title, description, release_year, first_name, last_name FROM film AS f, film_actor AS fa JOIN actor AS a WHERE fa.actor_id = a.actor_id AND fa.film_id = f.film_id ORDER BY :orderby :order LIMIT :limit');
$stmt->execute(
array( 'order'=>$order,
'orderby'=>$orderby,
'limit'=>$limit
)
);
尝试运行此查询时,我收到标题中描述的错误。我试图找到一种调试输出的方法,但失败了。我会很感激帮助。PS:我正在使用 PHP 中的 PDO 学习 SQL。
提前致谢。