MySQL错误:Error Code: 1136
伊谢尔伦
伊谢尔伦 2017-04-17 12:06:46
0
1
853

我有一张数据表,表结构如下:

CREATE TABLE IF NOT EXISTS `icy_car` (
  `car_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `car_type` varchar(50) DEFAULT NULL COMMENT '车型代码',
  `car_brand` varchar(50) DEFAULT NULL COMMENT '品牌',
  `car_series` varchar(50) DEFAULT NULL COMMENT '系列',
  `car_year` year(4) DEFAULT NULL COMMENT '年份',
  `car_price` double DEFAULT NULL COMMENT '价格(万为单位)',
  `car_CC` double DEFAULT NULL COMMENT '排气量(ML为单位)',
  `car_Fconsumption` double DEFAULT NULL COMMENT '油耗(L/100km)',
  `car_power` double DEFAULT NULL COMMENT '功率(KW为单位)',
  `car_torsion` double DEFAULT NULL COMMENT '扭矩(N·m为单位)',
  `car_cylinder` varchar(50) DEFAULT NULL COMMENT '气缸',
  `car_drive_mode` varchar(50) DEFAULT NULL COMMENT '驱动模式',
  `car_speed` varchar(50) DEFAULT NULL COMMENT '极速(km/h)',
  `car_quicken` varchar(50) DEFAULT NULL COMMENT '加速(km/h)',
  `car_describe` text COMMENT '车型描述',
  `car_speed_variator` varchar(50) DEFAULT NULL COMMENT '变速器',
  `car_weight` varchar(50) DEFAULT NULL COMMENT '车重(kg)',
  `car_publish_date` int(11) DEFAULT NULL COMMENT '发布日期',
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=14600 ;

在PHP里执行一条语句,语句如下:

INSERT INTO icy_car(car_type,car_brand,car_series,car_year,car_price,car_CC,car_Fconsumption,car_power,car_torsion,car_cylinder,car_drive_mode,car_speed,car_quicken,car_describe,car_speed_variator,car_weight,car_publish_date) VALUES 
('ACUR14AH','讴歌','ILX','2013''29.80','1997','7.6','112','190','直列4缸','前轮驱动','','','三厢轿车 4门 精锐版 手自一体 5速 前轮驱动 2.0多点式喷射','手自一体','1365','10/2013')

出现如下错误:

Error Code: 1136. Column count doesn't match value count at row 1

我仔细看了下,我插入的字段是17个,值也是17个,但是报的错误说字段和只的数目不匹配,麻烦大家帮忙看下哪里错了。。

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(1)
Ty80

Can’t you see that one less person is worth it? Count well

INSERT INTO icy_car(car_type,car_brand,car_series,car_year,car_price,car_CC,car_Fconsumption,car_power,car_torsion,car_cylinder,car_drive_mode,car_speed,car_quicken,car_describe,car_speed_variator,car_weight,car_publish_date) VALUES
('ACUR14AH','Acura','ILX','2013''29.80','1997','7.6','112','190','Inline 4-cylinder','front Wheel drive','','','Sedan sedan 4-door elite version with manual transmission, 5-speed front-wheel drive, 2.0 multi-point injection','Automatic manual','1365','10/2013')

Missing comma

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template