Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Strange problem I can't seem to get my head around. I have a table in a MySQL database with the following structure...

    CREATE TABLE IF NOT EXISTS `tblbaseprices` (
  `base_id` bigint(11) NOT NULL auto_increment,
  `base_size` int(10) NOT NULL default '0',
  `base_label` varchar(250) default NULL,
  `base_price_1a` float default NULL,
  `base_price_2a` float default NULL,
  `base_price_3a` float default NULL,
  `base_price_1b` float default NULL,
  `base_price_2b` float default NULL,
  `base_price_3b` float default NULL,
  `site_id` int(11) default NULL,
  PRIMARY KEY  (`base_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=134 ;

The last base_id I have in there is 132. I assume a couple of records have been deleted to auto_increment is set to 134, as you can see about. I am trying to run the following SQL statement, and when I do, I get the error "Duplicate entry '2147483647' for key 1".

INSERT INTO tblbaseprices (site_id, base_size, base_price_1a, base_price_2a, base_price_3a, base_price_4a) VALUES ('', '', '', '', '', '')

Does anybody have any ideas?

Many thanks!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.1k views
Welcome To Ask or Share your Answers For Others

1 Answer


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...