[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: insert + AUTO_INCREMENT
check the archive, someone answered that one this weekend.
Cal
http://www.calevans.com
-----Original Message-----
From: Joris Kluivers [mailto:joris@xxxxxxx]
Sent: Sunday, March 04, 2001 5:56 AM
To: mysql@xxxxxxxxxxxxxxx
Subject: insert + AUTO_INCREMENT
hi,
i have a problem
i have a database table created with the statement:
CREATE TABLE chatmessages (id tinyint(6) DEFAULT '0' NOT NULL
AUTO_INCREMENT, message text, username varchar(100), UNIQUE id (id);
I insert records with:
INSERT INTO chatmessages (message, username) VALUES ('this is my message',
'joris');
this works fine (for a while), i can insert messages and retreive them 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.
can someone help me?
thanks in advance
Joris Kluivers
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <mysql-thread67349@xxxxxxxxxxxxxxx>
To unsubscribe, e-mail <mysql-unsubscribe-treed=ultraviolet.org@xxxxxxxxxxxxxxx>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
This mailing list archive is a service of Copilot Consulting.