Re: AUTO_INCREMENT

From: Date: Sun, 04 Mar 2001 15:36:01 +0000
Subject: Re: AUTO_INCREMENT
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-7107@lists.php.net to get a copy of this message
on 3/4/01 3:58 AM, Joris Kluivers at joris@mac.com wrote: > CREATE TABLE chatmessages (id tinyint(6) DEFAULT '0' NOT NULL > AUTO_INCREMENT, message text, username varchar(100), UNIQUE id (id); > with php. > But after some time i get the error: > ERROR 1062: Duplicate entry '127' for key 1 > but how can this be because i've set it to AUTO_INCREMENT. That's the limit of the TINYINT type. ALTER TABLE and change the type to INT. Paul

« previous php.db (#7107) next »