SQL语句出现问题

ben*_*wad 0 php sql syntax

我正在尝试使用表单和PHP函数将值输入到数据库表中.PHP似乎很好,因为它创建的SQL语句看起来没问题,但数据库总是会抛出错误.这是我的代码生成的SQL语句(具有任意值):

INSERT INTO Iteminfo ('itemName', 'itemSeller', 'itemCategory', 'itemDescription', 'itemPrice', 'itemPostage', 'itemBegin', 'itemEnd', 'buynow', 'itemPicture')
values ('gorillaz album', 'ben', 'music', 'new one ', '5.00', '1.00', '2010-03-15 14:59:51', '2010-03-16 14:59:51', '0', 'http://www.thefader.com/wp-content/uploads/2010/01/gorillaz-plastic-beach.jpg')
Run Code Online (Sandbox Code Playgroud)

当我使用PHP函数来评估查询时以及当我使用phpMyAdmin手动输入查询时,这会引发错误.但是,我看不出它有什么问题.任何人都可以对此有所了解吗?除了itemPrice和itemPostage(存储为DECIMAL(4,2))以及itemBegin和itemEnd之外,所有字段都是VARCHAR值,它们存储为DATETIME.

Dat*_*han 8

尝试

INSERT INTO Iteminfo (itemName, itemSeller, itemCategory, itemDescription, itemPrice, itemPostage, itemBegin, itemEnd, buynow, itemPicture)
values ('gorillaz album', 'ben', 'music', 'new one ', '5.00', '1.00', '2010-03-15 14:59:51', '2010-03-16 14:59:51', '0', 'http://www.thefader.com/wp-content/uploads/2010/01/gorillaz-plastic-beach.jpg')
Run Code Online (Sandbox Code Playgroud)

不应引用列名称.