PHP: WHERE in another table

Yes so im building an query from the advanced search form.I have this:\[code\]$query = "SELECT * FROM users WHERE 1 "; $query .= "AND sex = '$sex' ";\[/code\]for now, next im going to have AND birthday.. but then i dont know how to do it, because users birthday is stored in users_profileSo please correct me, how can i:\[code\] $query .= "AND birthday in users_profile = '1'"; \[/code\]Is this possible even, or should i reconstruct it and put birthday in users instead..update:in users, the id column there, is binded with users_profile
 
Back
Top