"uid" AUTO_INCREMENT refreshing
#1
I would like to auto-refresh AUTO_INCREMENT value in mybb_users table when I delete user. How can I do that?
[Image: moderator-btn.png]
#2
You can't do that, that's screwing up the auto-increment function. And uids of the users in other tables wouldn't be correct anymore ...
#3
I don't know if you understand what I mean. For example:
- user X is registering on board (uid=150)
- X didn't activate his account
- I'll delete X's account, but next uid=151.

With few accounts like this... will be a huge hole in uid-numbers continuity.
[Image: moderator-btn.png]
#4
Which does/means nothing. The only thing changing it will do is waste your & my time
#5
If you're really desperate, and wish to do so for whatever reason, the following query will work:

ALTER TABLE mybb_users AUTO_INCREMENT = x

x is the value you wish the next number to be (so if your last user ID that still exists is 151, then you would set it to 152)

You'd need to run the query via phpMyAdmin, however we cannot support you if you do this: MyBB stores user ID maps in several places that aren't deleted when you delete a user (for example posts) and when you're associating new users with that same User ID, you'll have posts being mis-associated with that user.

Chris
#6
Thanks guys Smile I've do it myself before you write here, Chris.
Anyway - this "option" is usefull for me with new users and any posts/topics aren't in danger, so take it easy Smile
I think about automatic, not manually changeing this value.
[Image: moderator-btn.png]


Forum Jump:


Users browsing this thread: 1 Guest(s)