check the archive, someone answered that one this weekend.

Cal
http://www.calevans.com


-----Original Message-----
From: Joris Kluivers [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 04, 2001 5:56 AM
To: [EMAIL PROTECTED]
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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to