Mass updating subscription end date

Discussion in 'Troubleshooting' started by allanx24, May 26, 2007.

  1. allanx24

    allanx24 New Member

    Joined:
    May 21, 2007
    Messages:
    3
    Does anybody know if there's a way to change all users subscription end dates? I just imported a big list of customers from Paypal and I didn't make the end date far enough from today's date (it's actually not a membership, but a lifetime product deliver).

    Thanks!

    Allan
  2. draj

    draj New Member

    Joined:
    Dec 29, 2006
    Messages:
    252
    Hi Allan!
    Run the following in the SQL Monitor:

    UPDATE amember_payments SET
    expire_date = '2037-01-01';


    This will update all users without exception for Lifetime subscription until that date with one click and a few seconds.

    However if you want to relate the update with the member_id then you must cange the Query a bit adding the WHERE clause with some more logic.

    DO NOT FORGET TO REBUILD THE DATABASE AFTERWARDS. Otherwise they will be set to have the status as expired, happening because of the unwanted $member[data][status] field. By rebuilding the database, it will get recalculate everything and every member record will function fine.
  3. allanx24

    allanx24 New Member

    Joined:
    May 21, 2007
    Messages:
    3
    Hi Draj,

    Thanks a lot for your answer! However, call me a total newbie, but I have no idea how to get to the "SQL Monitor" you speak of to run that line of code. Can you point me in the right direction?

    Thanks!

    Allan
  4. draj

    draj New Member

    Joined:
    Dec 29, 2006
    Messages:
    252
    Hi!

    Download the NaviCat program. You will find more details in my other thread regarding tuning mysql server.

    Install it according to instructions. Lots of docs are available there. This will also serve for you on a long term a lot of help like backups, etc.

    In the NaviCat, you will find the SQL Monitor.

    You can use any sql administration utility like phpadmin instead of NaviCat.

    Well, NaviCat is exactly for people like you, user-friendly...

    Feel free to ask again, if you have problems.
  5. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Or, you can contact support via helpdesk with link to this topic and login info, and we will help.

Share This Page