谁能看到为什么我收到此错误导致错误:
#1136 - Column count doesn't match value count at row 1
这是查询:
INSERT INTO `people`
(`id`,`title`,`first_name`,`middle_initial`,`preferred_name`,`last_name`,
`home_phone`,`mobile_phone`,`email`,`gender`,`date_of_birth`,`qff`,`status`)
VALUES ('20','Mr','first','mid','pref','fam',
'home','mobile','email','male','0000-00-00','qff','active')
ON DUPLICATE KEY UPDATE
`people`.`id` = LAST_INSERT_ID(`people`.`id`),
`people`.`title` = 'Mr',
`people`.`first_name` = 'first',
`people`.`middle_initial` = 'mid',
`people`.`preferred_name` = 'pref',
`people`.`last_name` = 'fam',
`people`.`home_phone` = 'home',
`people`.`mobile_phone` = 'mobile',
`people`.`email` = 'email',
`people`.`gender` = 'male',
`people`.`date_of_birth` = '0000-00-00',
`people`.`qff` = 'qff',
`people`.`status` = 'active'
和表结构:
CREATE TABLE `people` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` text,
`first_name` text,
`middle_initial` text,
`preferred_name` text,
`last_name` text,
`home_phone` text,
`mobile_phone` text,
`email` text,
`gender` enum('male','female') DEFAULT NULL,
`date_of_birth` date DEFAULT NULL,
`qff` varchar(20) NOT NULL,
`status` enum('active','inactive') NOT NULL,
`updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`updated_by` int(10) unsigned DEFAULT NULL,
`updated_by_type` enum('person','admin') DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;