Page 1 of 1

Not auto-incrementing correctly

Posted: Sun Jul 01, 2007 12:02 am
by thefreebielife
this is my database table info:

Code: Select all

  `uId` int(6) NOT NULL auto_increment,
Now i have admin preinstalled for uId = 1

But when users join, their uId's are like 7000 (needed for a different DB).

I cannot figure out how to change this for this particular DB to make the next user be 2 and so on.

Posted: Sun Jul 01, 2007 12:34 am
by feyd
It probably is auto-incrementing correctly, but not how you assumed it would.

You will need to alter the table. We've had several posts on this subject before, please seek them out using the hints I've given.

Posted: Sun Jul 01, 2007 5:49 am
by superdezign
You can change where the auto_increment is currently starting at.

Code: Select all

alter table `table` set auto_increment = ?