New lower pricing for Subscriptions

50%off old price

member_data date extraction

About Support Directory member_data date extraction

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2808
    Avatar for bdoylebdoyle
    Member

    Hello,

    using sql what is the best way to extract the date from the p_jw4au4_church_admin_people.member_data? For example I have someone who had the member_type of “Visitor”; member_type_id=1, “Regular Attendance”; member_type_id=2 and “Member”; member_type_id=3 The member_data field has dates for each of these and I want the date for “Member”.

    #4020
    Avatar for Andy MoyleAndy Moyle
    Keymaster

    The dates for each member type are stored as a serialized array under the member_data column. When I did it, I didn’t envisage ever really using it in a way that required a search. I will get round to using the people_meta table to store that data, so it can be used more easily – actually probably for the next update!

    For now something like…
    SELECT * FROM p_jw4au4_church_admin_people WHERE member_data REGEXP ‘.*”3″;s:[0-9]’

    may work! https://stackoverflow.com/questions/4116419/mysql-select-query-within-a-serialized-array

    What will work is using a php script to grab the records, unserializing the member_data array and looking for an array_key 3

    #4039
    Avatar for bdoylebdoyle
    Member

    Thank you! I will be trying this!

    #4040
    Avatar for Andy MoyleAndy Moyle
    Keymaster

    The new update v1.45x puts member dates in the people_meta table making it easier for you

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.