MyBB Community Forums

Full Version: Help with SQL query - URGENT - Removed my admin status!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am planning on setting up a new group for those who have under 50 posts entitled New Bloods. However I know that once I do that, the fastest way to get members into that group from the main current one would be to run an SQL query.

However my knowledge in that area is limited, if someone could help me with what exact query I would need to run?

Many Thanks
UPDATE `mybb_users` SET `usergroup` = 'X' WHERE `postnum` < '50';

Change X to the ID of the new group Smile
Thanks for that. One more question - how do I set the new group to be the default group for new members?
Just as an FYI you could set up a promotion instead of running the SQL query.
Aaargh - like the idiot I am I tried to be clever and moved EVERYONE to the new user group - how can I make myself an admin again, bearing in mind I can't access the adminCP......god I feel stupid
Look at this tutorial thread:

http://community.mybboard.net/thread-44380.html

There is a query there about:

To put you back into the Admin usergroup if you get changed to a different group
Thank you! Your a life saver Smile
Thanks to Matt for the great tutorial. Smile That is useful for me too.
Once again I would like to point out that you could have just set up a group promotion Wink
I did do that in the end - but as the group promotion only promotes if the user has been active, I wanted to move them all into the correct group through an SQL query.

However I wasn't as smart as I thought I was as I forget to exclude myself from the query lol Smile