Other than the fact that I don't think you need to define a UNIQUE key for a
field that is marked as a primary key, it looks ok.  I just stuffed it into
my tmp database and added 46616 records to it without a problem. That means
it's got to be your MySQL config.

Cal
http://www.calevans.com


-----Original Message-----
From: Tyrone Mills [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 13, 2001 11:24 AM
To: Mysql@Lists. Mysql. Com
Subject: RE: Duplicate entry '0' for key 1


Here's  the CREATE TABLE syntax I used on the latest table to do this to
me...

CREATE TABLE site_users (
user_id INTEGER UNSIGNED DEFAULT '0' NOT NULL AUTO_INCREMENT,
user_name VARCHAR(20) BINARY NOT NULL,
user_password VARCHAR(20) BINARY NOT NULL,
user_referrer_id INTEGER UNSIGNED NOT NULL,
user_site_id INTEGER UNSIGNED NOT NULL,
user_number_id INTEGER UNSIGNED NOT NULL,
user_create_date TIMESTAMP NOT NULL,
PRIMARY KEY (user_id),
UNIQUE user_id (user_id)  )

The user_id column made it to 383 before reverting to 0.

Any ideas?

-----Original Message-----
From: Cal Evans [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 13, 2001 9:06 AM
To: Tyrone Mills; Mysql@Lists. Mysql. Com
Subject: RE: Duplicate entry '0' for key 1


What's your datatype?

Cal
http://www.calevans.com


-----Original Message-----
From: Tyrone Mills [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 13, 2001 10:59 AM
To: Mysql@Lists. Mysql. Com
Subject: Duplicate entry '0' for key 1
Importance: High


Why is it that a seemingly random intervals anyone of the tables in my
database will decide to start auto incrementing back to 0? More importantly
how to I stop this? I've tried not inserting a value for the auto increment
column, I've tried inserting NULL, or '', nothing works!!

____________________________________________________
UNIX is user-friendly, it's just picky about who its friends are...







---------------------------------------------------------------------
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



---------------------------------------------------------------------
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