Determine Userids for Coupons Used

Discussion in 'Customization & add-ons' started by hopson, Oct 28, 2015.

  1. hopson

    hopson aMember Pro Customer

    Joined:
    Oct 21, 2013
    Messages:
    15
    Hello,

    Which table/field tells me the coupon code used, by userid? I can't find it in the amuser table.
  2. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    You can find it in table am_invoice. Here is MySQL query you can use to retrive it
    Code:
    SELECT DISTINCT coupon_code FROM am_invoice WHERE user_id=1 AND status<>0
    replace 1 with actual user id in query above.

Share This Page