SQl query for location

jellytoe

Member
I am wanting to query the database where location = "specific city" and return a list of e-mails. Can anyone help with how to write the query? I'm a clueless SQL user.
 
Try this:
Code:
SELECT u.email
FROM xf_user as u
LEFT JOIN xf_user_profile AS p ON
(p.user_id = u.user_id)
WHERE p.location = 'London'

Change 'London' to suit.
 
Back
Top Bottom