php送过来的语法有错,我直接用MySQL的SQL语法输入也是有问题。
我的资料表结构为:
CREATE TABLE `order` (
`id` int(12) NOT NULL,
`orderyear` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`ordertime` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`classid` int(11) NOT NULL DEFAULT '0',
`ordername` text COLLATE utf8_unicode_ci NOT NULL,
`orderid` int(11) NOT NULL DEFAULT '0',
`price` int(11) NOT NULL DEFAULT '0',
`size2a` int(11) NOT NULL DEFAULT '0',
`size2b` int(11) DEFAULT '0',
`size2c` int(11) DEFAULT '0',
`size2d` int(11) DEFAULT '0',
`size2e` int(11) DEFAULT '0',
`size2f` int(11) DEFAULT '0',
`ingredient` text COLLATE utf8_unicode_ci NOT NULL,
`origin` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`wash` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`notes` text COLLATE utf8_unicode_ci NOT NULL,
`upload1` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`upload2a` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`upload2b` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`upload2c` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`upload2d` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`upload2e` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`upload2f` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`dates2` date NOT NULL DEFAULT '0000-00-00',
`addr` varchar(20) CHARACTER SET utf8 NOT NULL DEFAULT '',
`num` int(11) DEFAULT '0',
`checked` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
`month1` float NOT NULL,
`month2` float NOT NULL,
`hotsale` int(11) NOT NULL
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
输入以下资料:
insert into order(`id`, `orderyear`, `ordertime`, `classid`, `ordername`, `orderid`, `price`,`size2a`,`size2b`, `size2c`, `size2d`, `size2e`, `size2f`, `ingredient`, `origin`, `wash`, `notes`,`upload1`, `upload2a`, `upload2b`, `upload2c`, `upload2d`, `upload2e`, `upload2f`, `dates2`, `addr`, `num`, `checked`, `month1`, `month2`, `hotsale`) values
(NULL,'2015','12','23','232','1','3','6','0','0','0','0','0','5','4','','','','','','','','','','2015-12-24','14.19.39.1','0','on','0.9','0.8','')
得到的是:
#1064 - 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(`id`, `orderyear`, `ordertime`, `classid`, `ordername`, `orderid`, `price`' at line 1
不知道是哪里错了