我在插入表格时遇到一点问题,这是代码:
mysql_query("INSERT INTO admin_menu (id, title, type, icon, parent, url, order, append, module) VALUES('', 'powerpoint', '0', 'powerpoint.png', '0', 'powerpoint/config', '0', '0', '0' ) ") or die(mysql_error());
它给我以下错误:
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 'order, append, module) VALUES('', 'powerpoint', '0', 'powerpoint.png', '0', 'pow' at line 1
非常感谢任何帮助,谢谢!
最佳答案
order
是 reserved word .用反引号包裹它
... url, `order`, append,...
你也不应该使用 mysql_query
.
Use of this extension is discouraged. Instead, the MySQLi or PDO_MySQL extension should be used.
关于php - MySQL 错误 - 插入表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12886096/