Looking for an SQL code to mass update expiry date

Discussion in 'aMember Pro v.4' started by mhmtozek, Jul 6, 2012.

  1. mhmtozek

    mhmtozek Member

    Joined:
    Aug 9, 2010
    Messages:
    51
    Hi,

    When I moved all vBulletin members into amember, i have manually added a subscription pack and set an expiry date such as 03.01.2014. All 5000+ imported users got that pack with same expiry date.

    I made a mistake actually while setting expiry date. It was suppose to be 03.01.2013. Is there any easy SQL code to execute and mass update that specific date? There is not any single subscription on forums with same date, so a quick find + replace string if possible would be just perfect.

    Thanks in advance
  2. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    The easiest way, and the way I would do it, is to write a simple php script that would step through the table concerned line by line looking for the incorrect date '03.01.2014' and those rows that contained this wrong date would be updated by writing the correct wanted one.

    It would take quarter hour or so to write script which, when run, would change all the wrongly entered dates in a matter of seconds.
  3. mhmtozek

    mhmtozek Member

    Joined:
    Aug 9, 2010
    Messages:
    51
    I would probably be able to update values right using SQL but if i only knew which table/tables to be updated.
  4. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    What version of aMember are you using?

    In aMember v3 you can update the payments table to set the expire_date field to whatever you like.
  5. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    In V4 expire date is contained in am_access and am_access_cashe

Share This Page