此命令在执行时出现语法错误,当我添加ORDER BY条件时显示该错误
"SELECT * FROM `reservation` WHERE event_id IN (SELECT id FROM event WHERE user_id = 3 ") ORDER BY dateReservation
答案 0 :(得分:0)
您必须在语句末尾用双引号引起来。
答案 1 :(得分:0)
应该是:
"SELECT * FROM reservation WHERE event_id IN (SELECT id FROM event WHERE user_id = 3 ) ORDER BY dateReservation"