我收到了以下错误,无论我如何检查它,即使与其他人一起,我也找不到错误:
查询:
INSERT INTO keymaps ( CharacterID, Key, Type, Action ) VALUES ( '100002', '18', '4', '0' )
Run Code Online (Sandbox Code Playgroud)
错误:
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, Type, Action ) VALUES ( '100002', '18', '4', '0' )' at line 1
Run Code Online (Sandbox Code Playgroud)
该表被调用keymaps,它包含:
int(11) ID (自动递增)int(11) CharacterIDint(11) Keysmallint(6) Typesmallint(6) Action没有字段允许null.
怎么了?
注意:我不知道是在SF还是SO上发布这个,但我认为它更适合SO,因为它是语言语法.随意移动它.
Key是一个保留字.你需要用反引号包装它.
INSERT INTO keymaps ( `CharacterID`, `Key`, `Type`, `Action` )
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
47 次 |
| 最近记录: |