Bug??? "Duplicate entry '255' for key 1 " on auto increment
| From: | Mark Abrams | Date: | Tue, 22 May 2007 04:51:53 +0000 |
| Subject: | Bug??? "Duplicate entry '255' for key 1 " on auto increment | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-27920@lists.php.net to get a copy of this message | ||
Hi All,
I have a table problem with "Duplicate entry '255' for key 1 " when any of
my auto increment rowID fields reaches 255
I have installed PHP Version 5.1.2 and mySQL 5.0.11-beta on Win XP Pro.
Each table in my DB that uses an auto increment for rowID fails at the 255th
record insert.
I have redefined the field: TINYINT, INT, VARCHAR, ... Same problem on
several files. They all work OK until I hit #255
Is this a bug? Have I defined my table improperly? Is there a fix?
TIA,
Mark
Here is my table defn:
$query = "CREATE TABLE $table_name (
rowID INT UNSIGNED NOT NULL AUTO_INCREMENT,
category VARCHAR(25) NOT NULL,
trans_type VARCHAR(8) NOT NULL,
PRIMARY KEY (rowID))";