PDA

View Full Version : User ID problems...


Boofo
06-12-2002, 09:22 PM
Can someone please explain to me how I can have a user id of 24 for a member when I only have 21 members on the board? And how do I fix it?

XyuRi
06-13-2002, 12:55 AM
well, you have obviously deleted some members, right ?

Boofo
06-13-2002, 02:47 AM
No, I haven't deleted any members. My member's list shows 21, The Admin CP user find (Find All Users) shows 21. There are 21 members there. :)

Originally posted by XyuRi
well, you have obviously deleted some members, right ?

XyuRi
06-13-2002, 02:55 AM
maybe the others are placekeepers for an admin, mod, supermod; so that the entries are not completely empty ??

(i dont really know)

Boofo
06-13-2002, 02:58 AM
I guess I don't really follow you here. Is this normal or is there something I can and need to do to fix it? :)

Originally posted by XyuRi
maybe the others are placekeepers for an admin, mod, supermod; so that the entries are not completely empty ??


(i dont really know)

XyuRi
06-13-2002, 03:27 AM
I am assuming you have downloacded the source code for a forum (probably VB), and in that case I'd suggest looking through the DB ebtries to see exactly what else has been assigned to those other ID entries.

(i dont know anything about vB :ermm: )

Xenon
06-13-2002, 11:18 AM
the userid has an autoincrement function in the db, so for every user it is set up by one, but if you delete a user, the gaps won't be filled.

so if so has the userid 24 it is the 24th user which has registred on your board, but this means not, that 23 users are already registred, because if you have created a test user, and deleted this account, it was a registred member, and so the userid has a gap there now.

Boofo
06-13-2002, 11:24 AM
Is there a way to reset it to take out any gaps? I didn't add any test users or anything like that so I don't know WHERE the gaps came from. I have the same problem with my quotes. I have a 4 quote difference in there, too. There I did delete some, but it should have filled up the empty spaces. It did for a couple of quotes I deleted but not the rest. I went in to myphpadmin and couldn't find a way to delete anything (like the gaps). :)

Originally posted by Xenon
the userid has an autoincrement function in the db, so for every user it is set up by one, but if you delete a user, the gaps won't be filled.

so if so has the userid 24 it is the 24th user which has registred on your board, but this means not, that 23 users are already registred, because if you have created a test user, and deleted this account, it was a registred member, and so the userid has a gap there now.

Xenon
06-13-2002, 11:33 AM
try this query:

ALTER TABLE user AUTO_INCREMENT = 0;

Boofo
06-13-2002, 11:46 AM
That didn't change anything. It still shows my 21st user (last one) with an ID of 24. :)

Originally posted by Xenon
try this query:

ALTER TABLE user AUTO_INCREMENT = 0;

Xenon
06-13-2002, 12:32 PM
yes, but now when you get a new user, it will fill the gaps :)

Boofo
06-13-2002, 01:23 PM
Then if I ever do delete any users I should run this again?

How about the quotes, can the same thing be done there?

Originally posted by Xenon
yes, but now when you get a new user, it will fill the gaps :)

Xenon
06-13-2002, 01:26 PM
you have to do tha again, if the autoincrement is higher than the userid which becames deleted..

yes, you can use this query which every autoincremented field.

Boofo
06-13-2002, 01:44 PM
Thank you very much. I learned something I didn't know today. Looks like it's going to be a good and productive day after all. :)

Boofo
06-13-2002, 02:08 PM
Bad news...I just tried adding a quote and I still have a 4 quote difference. It didn't fill one of the gaps with the new quote. The query ran successfully. And ideas on this one? :)

Originally posted by Xenon
you have to do tha again, if the autoincrement is higher than the userid which becames deleted..

yes, you can use this query which every autoincremented field.

Xenon
06-13-2002, 03:05 PM
the quotes are a hacked function right?
so i don't know, because i haven't included the quote hack..

normaly it should work, but maybe try to ask at the supportthread of the quotes hack.

Boofo
06-13-2002, 05:51 PM
That query for the users didn't work either. I just had a new user log on and he is number 25 now (which he is actually the 22nd member). :)

Originally posted by Xenon
the quotes are a hacked function right?
so i don't know, because i haven't included the quote hack..

normaly it should work, but maybe try to ask at the supportthread of the quotes hack.

Xenon
06-13-2002, 07:54 PM
I haven't tested it, but i know it should work, firefly has posted this method on vb.com:
http://www.vbulletin.com/forum/showthread.php?s=&threadid=45635

and i found a thread here where it was told it works perfect...
can'T find it anymor, forgot the exact search claus

Boofo
06-13-2002, 08:09 PM
It might work on the forum table, but it didn't work on the user or quote table for some reason. :)

Originally posted by Xenon
I haven't tested it, but i know it should work, firefly has posted this method on vb.com:
http://www.vbulletin.com/forum/showthread.php?s=&threadid=45635

and i found a thread here where it was told it works perfect...
can'T find it anymor, forgot the exact search claus

Xenon
06-13-2002, 08:44 PM
hmm, then there is no way....