【发布时间】:2012-02-04 23:29:44
【问题描述】:
我快疯了,我想在东西表中插入一个值,但我得到了这个错误
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 'name,describe,price,picname) values ('dfg','dfgdf','2','hr')' at line 1
我的代码是:
mysql_query("insert into stuff(name,describe,price,picname) values ('dfg','dfgdf','2','hr')") or die("cannot execute the query" .mysql_error());
我能做什么?它浪费了我1个小时的工作! 谢谢
【问题讨论】:
-
您是否尝试在
stuff和字段列表的左括号之间添加一个空格? -
这里放空格
stuff (name,describe,price,picname) -
是的,但我得到了同样的错误!
-
describe 也是保留关键字
-
请显示表'stuff'的定义。
标签: php mysql mysql-error-1064