1. 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!

Discussion in 'General PHP and MySQL Discussions' started by ESAD, May 7, 2015.

  1. ESAD

    ESAD Member

    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.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    It does.


    I assumed in your ticket you were aware of that function but wanted to apply it en masse via a query.
  3. ESAD

    ESAD Member

    Awesome! You are correct though.. I do want to do this for many supporters with a sql query.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    It's not a straightforward query as there are several tables involved.

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

    ESAD Member

    Alrighty then. . . .

    It would be nice if the manual account upgrade was also on the users extra tab.

Share This Page