Re: MySQL Error???

From: Date: Thu, 28 Jun 2001 15:15:15 +0000
Subject: Re: MySQL Error???
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-9933@lists.php.net to get a copy of this message
At 10:24 AM -0600 6/27/01, Brian Grayless wrote:
Is anyone familiar with this MySQL error? "1062: Duplicate entry '127' for key 1" I wrote a great bookmark management program that works fine, but everytime I insert bookmarks, I insert somewhere over 120 and I start getting this error, and it won't add them anymore. Any suggestions???
You declared your AUTO_INCREMENT column as a TINYINT, which has a range of -128 to 127. Use ALTER table to change the column from a TINYINT to a larger integer type. You may as well make it UNSIGNED as well, because you don't use negative numbers in the column. Something like this: ALTER TABLE tbl_name MODIFY col_name INT UNSIGNED NOT NULL
Thanks, B R I A N G R A Y L E S S Web Administrator Premier Resorts www.premier-resorts.com P: 435-655-4812 F: 413-618-1518
-- Paul DuBois, paul@snake.net

« previous php.db (#9933) next »