SELECT * FROM users WHERE (zip = '41017' OR zip = '41011' OR zip = '41012' OR zip = '41018' OR zip = '41019' OR zip = '41016') AND valid_email = '1' ORDER BY username ASC LIMIT 0, 20So, in theory, this would select any users who have one of the above zip codes. It appears to find the right users correctly, but only one result is returned.
For example, I have 2 users with the zip '41017'. This query only returns the first of these users (depending on if the ORDER BY is ASC or DESC), instead of both.
Any ideas? Also, is there a better way to do this? Because as the radius increases, the number of applicable zip codes increases exponentially.
Thanks for any help!