Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MySQL Queries
#1
I wanted to bulk change all users in the mybb_users table who were  in the awaiting activation to be in the registered usergroup
UPDATE mybb_users SET usergroup = REPLACE( usergroup, '5', '2' )

To replace empty column with same value:
UPDATE mybb_users SET password = 'TeMpPass'

To remove blank spaces in front of all email addresses:
UPDATE mybb_users set email = TRIM(email)

To add default avatar to everyone without any:
UPDATE mybb_users SET avatar = 'images/default_avatar.png' WHERE avatar = ''
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)