Set the length of rowID to 11, leave type as INT. -----Original Message----- From: Mark Abrams [mailto:mark@xxxxxxxxxxxxxxxxxxxxxxxx] Sent: 22 May 2007 06:52 AM To: php-windows@xxxxxxxxxxxxx Subject: Bug??? "Duplicate entry '255' for key 1 " on auto increment 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))"; -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php *********************************************************************************************** The information contained in this e-mail is confidential and may be subject to legal privilege. Access to this e-mail by anyone other than the intended recipient is unauthorised. If you are not the intended recipient you must not use, copy, distribute or disclose the e-mail or any part of its contents or take any action in reliance on it. If you have received this e-mail in error, please notify us immediately by e-mail (postmaster@xxxxxxxxxxxxxxxxxxxxxx) or telephone (+27 11 265 4200). This message is free of all known viruses. It has been screened for viruses by Blockmail. *********************************************************************************************** -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php