php-db | 2001062
Date: 06/28/01
- Next message: Steve Brett: "RE: [PHP-DB] delay script"
- Previous message: Jonathan Hilgeman: "RE: [PHP-DB] MySQL Error???"
- In reply to: Brian Grayless: "[PHP-DB] MySQL Error???"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 <email protected>-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Steve Brett: "RE: [PHP-DB] delay script"
- Previous message: Jonathan Hilgeman: "RE: [PHP-DB] MySQL Error???"
- In reply to: Brian Grayless: "[PHP-DB] MySQL Error???"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

