[英]what;s wrong with my sql query?
what;s wrong with my query ... 我的查询有什么问题...
i get the error message #1064 - You have an error in your SQL syntax; 我收到错误消息#1064-您的SQL语法有错误; check the manual that corresponds to your MySQL server version for the right syntax to use near '. 检查与您的MySQL服务器版本相对应的手册,以获取在'附近使用的正确语法。 mail_time FROM ibc_messages m , ibc_msg_queue q AND m . mail_time来自ibc_messages m,ibc_msg_queue q和m。 id = q . id = q msgid AND q' at line 1 msgid和q'在第1行
SELECT distinct q.msgid, q.mail_time, m.status,
FROM ibc_msg_queue q , ibc_messages m
WHERE q.mail_time = '0000-00-00 00:00:00' AND q.msgid = m.id
ORDER BY q.msgid
在第三列后删除逗号
SELECT distinct q.msgid , q.mail_time,m.status FROM
在“ FROM”子句之前,您要使用逗号
You have a redundant comma ( ,
) before your FROM
keyword. 在FROM
关键字之前,
您有一个多余的逗号( ,
)。 Just remove it, and you should be fine: 只需将其删除,就可以了:
SELECT distinct q.msgid , q.mail_time,m.status
FROM ibc_msg_queue q , ibc_messages m
WHERE q.mail_time = '0000-00-00 00:00:00' AND q.msgid = m.id ORDER BY q.msgid
You have an extra comma in there: 您在其中还有一个逗号:
YOURS: 您的:
SELECT distinct q.msgid ,
q.mail_time,
m.status,
FROM ibc_msg_queue q , ibc_messages m
WHERE q.mail_time = '0000-00-00 00:00:00'
AND q.msgid = m.id
ORDER BY q.msgid
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.