我正在尝试通过 mysqli 查询获取数据。查询看起来像:
SELECT * FROM pxldr_drawings
ORDER BY RAND()
WHERE id NOT IN (1,3,4,2)
LIMIT 1
但我收到以下错误消息
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 'WHERE id NOT IN (1,3,4,2) LIMIT 1' at line 3
我也试过 NOT IN ('1','3','4','2')
and NOT IN(1,3,4,2)
,但都没有成功。
谢谢,LB