• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Account Upgrade SQL Query help please!

#1
I have 5 levels of account upgrades.

I am looking to query the database and add a level 5 to any member that already has a lower level (1-4).
If they happen to have multiple levels that includes a level 5, they should be skipped.
But if they have a 1,2,3, or 4 concurrently, or any combination of those, they will get a lvl 5.

This request assumes they will simply have a manual secondary lvl5 usergroup added.

But if there is a way to add a level 5 account upgrade that expires on the same date as their latest expiring 1-4, then I'd prefer to do that so I don't have to check them all the time to remove the level 5 when the lower levels expire.

I wish xenforo had the ability to manually add "Account Upgrades" regardless.
 

Brogan

XenForo moderator
Staff member
#4
It's not a straightforward query as there are several tables involved.

I would recommend doing it via the UI in the ACP.