Hi all:
I use custom field 8 for users to select from a list of countries.
I'm looking to extract the emails of users from a list of countries (say Canada, Brazil and Peru).
So far I'm able to get a lost for a specific country, but I want to do a number of countries in one go (right now I can do this via the CP, but sometimes I need to do it for 15 or so countries, so it gets really painful) and also I need to exclude those who do not want to receive emails.
So far:
Many thanks
I use custom field 8 for users to select from a list of countries.
I'm looking to extract the emails of users from a list of countries (say Canada, Brazil and Peru).
So far I'm able to get a lost for a specific country, but I want to do a number of countries in one go (right now I can do this via the CP, but sometimes I need to do it for 15 or so countries, so it gets really painful) and also I need to exclude those who do not want to receive emails.
So far:
PHP Code:
SELECT email
FROM user
LEFT JOIN userfield ON user.userid = userfield.userid
WHERE field8 = 'Canada'
Comment