我试图更新 queueStatusINT WHERE statusINT 为 8 且 queueStatusINT 不等于 2 且类型为 $type。但我不断收到错误消息:
ERROR 1064 (42000) at line 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 ‘ queueStatusINT!='2’, type=’int'' at line 1
我使用此 SQL 查询进行更新:
UPDATE $mysqlTable SET queueStatusINT='2’ WHERE statusINT='8’, queueStatusINT!='2’, type=‘$type’;
我还注意到我可以在 SELECT 命令中执行 NOT 等于...</p>
SELECT nameTXT FROM $mysqlTable WHERE queueStatusINT!='2' ORDER BY queueStatusINT DESC, priorityINT DESC, id ASC LIMIT 7;