我试图在表中插入一些值查询低于:PHP - > MySQL查询无法弄清楚什么是错得到错误#1064
Insert into
auditlog (
event,
desc,
userid,
useripaddress,
audittype
)
VALUES (
'User Authenticated',
'Useradminsuccessfully logged in to the system',
'1',
'127.0.0.1','1'
)
它给了我下面的错误: #1064 - 你的SQL语法错误;检查与您的MySQL服务器版本相对应的手册,以便在'desc,userid,useripaddress,audittype'附近使用正确的语法。VALUES('User Authenticated','User admin su'at line 1
但是,插入使用phpMyAdmin它插入值和生成的查询是
INSERT INTO
`auditlog`(
`event`,
`desc`,
`userid`,
`useripaddress`,
`audittype`)
VALUES (
'User Authenticated',
'Useradminsuccessfully logged in to the system',
'1',
'127.0.0.1','1'
)
我看到的唯一的区别是,我不相信需要加引号,我不明白我要去哪里错了,我打破我的头现在:) :)
的可能重复(HTTP :/ /问题10706920/how-can-i-write-sql-for-a-table-that-shares-the-same-name-as-a-protected-keyword) – Jocelyn