MyBB Community Forums

Full Version: reset forum id, possible?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi guys, just curious if it is possible to reset the forum id to an inorder way..

example instead of 3,4,7,8,10 can it be reset to 1,2,3,4,5.....?

does it needs a query to database so it can do that reset?

thank you!
I don't think it would be possible Huh
Yes, it's possible. But it's not something you can do with just one or two queries.

For every forum id you change, you'd have to update every reference to it, and there are lots of places where the fid is used (parent list of sub forums, threads, posts, announcements, forum permissions, subscriptions, etc.). You'd also have to reset the auto increment counter for the forums table, so the next forum you create in the admin CP will actually be the next fid, and not a number larger than your old fids.

It's a dangerous thing to do, and next time you create or delete a forum, you'll have gaps in the numbering again anyway. Same if someone deletes a thread, there'll be a gap. And changing ids around will break all your links.
ok.. yeah that thing is really dangerous as we get the fid for every plugin use right? i though its easier if we set auto increment to 0?
thanks for the info..