RE: [PHP-WIN] Bug??? "Duplicate entry '255' for key 1 " on auto increment
| From: | Dale Attree | Date: | Tue, 22 May 2007 04:59:56 +0000 |
| Subject: | RE: [PHP-WIN] Bug??? "Duplicate entry '255' for key 1 " on auto increment | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-27921@lists.php.net to get a copy of this message | ||
Set the length of rowID to 11, leave type as INT.
-----Original Message-----
From: Mark Abrams [mailto:mark@hospitalsystemsgroup.com]
Sent: 22 May 2007 06:52 AM
To: php-windows@lists.php.net
Subject: [PHP-WIN] 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@jacklinenterprises.com) or telephone (+27
11 265 4200).
This message is free of all known viruses. It has been screened for viruses by Blockmail.
***********************************************************************************************