Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 8 Years, 6 Months, 1 Week ago Need SQL help
#1
Solved: 8 Years, 6 Months, 1 Week ago
Hello, My forum exploded literally over night (as in 300 online user in 1 minute) and 100s of registrations. I know my way a bit around in PHP, but am a total SQL noob.

Usually i move new members from Group A to Group B manually after they made 1 post.

This would take me hours to do it by hand, so i need a SQL query that
moves members with at least 1 post AND have registered since yesterday from group A to Group B

Can anyone help me?
#2
Solved: 8 Years, 6 Months, 1 Week ago
UPDATE `mybb_users` SET `usergroup` = 'B' WHERE `usergroup` = 'A' AND `postnum` >= '1' AND `regdate` > '1296906752';

This'll move people who registered in the last 24 hours. Change the A and B to the IDs of the relevant usergroups.

Also it'd probably be a lot easier to use the promotions system to change their usergroups, rather than doing it manually...
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
#3
Solved: 8 Years, 6 Months, 1 Week ago
(02-06-2011, 11:54 AM)MattRogowski Wrote:
UPDATE `mybb_users` SET `usergroup` = 'B' WHERE `usergroup` = 'A' AND `postnum` >= '1' AND `regdate` > '1296906752';

This'll move people who registered in the last 24 hours. Change the A and B to the IDs of the relevant usergroups.

Also it'd probably be a lot easier to use the promotions system to change their usergroups, rather than doing it manually...


That worked like a charm!

That would indeed be easier, but the usergroup goes with imageposting privileges.. There needs to be at least 1 moderator on if you allow that..

Thanks!
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)