Gauravk Posted January 11, 2020 Share Posted January 11, 2020 Appreciate some SQL help as I intend to filter members based on one of the field but being that field is multi option so I can't filter members from Admin CP. Hope there is a way to do that from DB and download all members email addresses who have checked "off-road - learn/drive" from this registration field. https://carnity.com/register Link to comment Share on other sites More sharing options...
newbie LAC Posted January 13, 2020 Share Posted January 13, 2020 SELECT email FROM core_members LEFT JOIN core_pfields_content ON core_members.member_id=core_pfields_content.member_id WHERE FIND_IN_SET(4, field_22); or SELECT email FROM core_members LEFT JOIN core_pfields_content ON core_members.member_id=core_pfields_content.member_id WHERE field_22=4; Gauravk 1 Link to comment Share on other sites More sharing options...
Gauravk Posted January 14, 2020 Author Share Posted January 14, 2020 Thanks @newbie LAC for wonderful SQL help. Both have worked and shown different number of results (emails). Any clue which one is correct 213 or 109? Link to comment Share on other sites More sharing options...
newbie LAC Posted January 14, 2020 Share Posted January 14, 2020 4 minutes ago, Gauravk said: Both have worked and shown different number of results (emails). Any clue which one is correct 213 or 109? Depends on what you need 1st query returns results for users which selected "off-road - learn/drive" or "off-road - learn/drive" + others 2st query returns results for users which only selected "off-road - learn/drive" Gauravk 1 Link to comment Share on other sites More sharing options...
Gauravk Posted January 14, 2020 Author Share Posted January 14, 2020 WOW, SUPER. I might need that in future too. Brilliant. Thanks a lot. Link to comment Share on other sites More sharing options...
Gauravk Posted January 26, 2020 Author Share Posted January 26, 2020 Hi @newbie LAC is there a way we can extract all name and mobile numbers for all off-road club members? https://carnity.com/clubs/off-road-club?do=members Link to comment Share on other sites More sharing options...
newbie LAC Posted January 27, 2020 Share Posted January 27, 2020 Hello, SELECT core_members.name, core_pfields_content.field_15 AS mobile FROM core_clubs_memberships LEFT JOIN core_members ON core_members.member_id=core_clubs_memberships.member_id LEFT JOIN core_pfields_content ON core_pfields_content.member_id=core_members.member_id WHERE core_clubs_memberships.club_id=7; Gauravk 1 Link to comment Share on other sites More sharing options...
Gauravk Posted April 16, 2020 Author Share Posted April 16, 2020 Hi @newbie LAC may I please have a new script for extracting all member who joined for car problem and solution. Fields needed: email phone first name last name zip city country gender elCheckbox_core_pfield_22_0 Thanks in advance Link to comment Share on other sites More sharing options...
Gauravk Posted April 19, 2020 Author Share Posted April 19, 2020 Thanks a lot @newbie LAC, for great teaching patience and help over the PM. Have a nice day. Link to comment Share on other sites More sharing options...
Recommended Posts