MySQL错误 - 插入表中

sli*_*ruk 1 php mysql insert

我在插入表时有一点问题,这里是代码:

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()); 
Run Code Online (Sandbox Code Playgroud)

它给了我以下错误:

您的SQL语法有错误; 查看与您的MySQL服务器版本相对应的手册,以便在"order,append,module"附近使用正确的语法VALUES('','powerpoint','0','powerpoint.png','0','pow'在第1行

任何帮助将不胜感激,谢谢!

sac*_*een 7

order是一个保留字.用反引号包裹它

... url, `order`, append,...
Run Code Online (Sandbox Code Playgroud)

你也不应该使用mysql_query.

不鼓励使用此扩展名.相反,应该使用MySQLi或PDO_MySQL扩展.