Is there a better way to write
SELECT users.id FROM `users`,`profiles` WHERE users.id = profiles.id &&
profiles.zipcode = '$zipcode' && users.id != '1' && users.id != '2'
&& profiles.picture != '' ORDER BY users.last_activity DESC LIMIT 0,11
(The code above is suppose to find all the users with a certain zipcode, and order them by the last_activity timestamp)
Also, is there anyway to sort it by last_activity and gender?