MyBB Community Forums

Full Version: SQL needed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, please can you help me to change list of users

1) all users with email adress [email protected] , to be changed to bl [email protected]

2) move all users in user group number 4 to user group number 5
thanks
1.
UPDATE mybb_users SET [email protected] WHERE [email protected]

[email protected] is the new email you want to set and [email protected] is the email you want to match.

2.
UPDATE mybb_users SET usergroup=X WHERE usergroup=Y

X is the GID of the usergroup you want to move them into and Y is the GID of their original usergroup.
^ You forgot single quote around the value.
1) UPDATE mybb_users SET email='[email protected]' WHERE email='[email protected]'

2) UPDATE mybb_users SET usergroup='5' WHERE usergroup='4'
It's not really necessary, it works either way.
Thanks a lot , solved