mysql - member table - data field question

Discussion in 'Customization & add-ons' started by hunteridge, Mar 31, 2010.

  1. hunteridge

    hunteridge New Member

    Joined:
    Jul 13, 2007
    Messages:
    8
    could you let me know the meaning of each of these bits of data:

    a:6:{s:7:"i_agree";i:1;s:6:"status";a:3:{i:4;i:0;i:2;i:1;i:7;i:1;}s:9:"is_active";i:1;s:17:"signup_email_sent";i:1;s:6:"phone1";s:12:"987-654-3210";s:6:"phone2";s:0:"";}

    Specifically, I am looking for which piece declares the product that the member has signed up for.

    thanks,
    M
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    This is serialized php array. So in php you should do this:
    $data = unserialize($data);
    Then $data[status] will contain array of product_id=>status pairs
  3. hunteridge

    hunteridge New Member

    Joined:
    Jul 13, 2007
    Messages:
    8
    Hi Alexander,

    Thanks for your quick reply.

    Unfortunately, I do not know what to do with
    your answer.

    Is there some place to put this to make it work,
    or some other page or code that is required?

    M
  4. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
  5. hunteridge

    hunteridge New Member

    Joined:
    Jul 13, 2007
    Messages:
    8
    thanks for the quick reply.

    my php prog level is "copy and paste" - sorry to say.

    M
  6. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Ok. What you want to do exactly please explain I will provide an example.
  7. stevem

    stevem Guest

    I'd like to know how I could unserialize the data in the "data" field and display it so the info is more readable to non-technical users.
    Thanks.
    SM
  8. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    PHP:
    var_dump(unserialize($data));

Share This Page