MySQL语法似乎正确 [英] Mysql syntax seems correct
本文介绍了MySQL语法似乎正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以...我收到了
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 'key = '48f9f4a3f5e10c63804400f320f46e26'' at line 1
,因此我在网页上将其反射回了我,内容为:
and so I reflected it back to myself, on the webpage and it reads:
SELECT * FROM email_confirm WHERE email = 'censored@gmail.com' AND key = '48f9f4a3f5e10c63804400f320f46e26'
我没有看到问题.
MySQL版本为5.1.65-cll
MySQL version is 5.1.65-cll
答案:
KEY是mysql中的保留字.需要backticks
!
Answer:
KEY is a reserved word in mysql. Need backticks
!
推荐答案
key
是MySQL关键字.由于它也是您字段的名称,因此请用适当的符号将其括起来:
key
is a MySQL keyword. Since it's also the name of your field, enclose it with the appropriate symbols:
SELECT * FROM `email_confirm` WHERE `email` = 'censored@gmail.com' AND `key` = '48f9f4a3f5e10c63804400f320f46e26';
这篇关于MySQL语法似乎正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文