MySQL query with AND, OR statements [SOLVED]
Posted: Mon Mar 01, 2010 1:03 am
I want a MySQL query that will display all the real estate properties with 3 bedrooms, 2 baths, and are either houses or duplexes. Here's my query:
$row=mysql_query('SELECT * FROM props WHERE bed="3" AND bath="2" AND type="house" OR type="duplex"');
But it obviously doesn't work. How can I get this working?
$row=mysql_query('SELECT * FROM props WHERE bed="3" AND bath="2" AND type="house" OR type="duplex"');
But it obviously doesn't work. How can I get this working?