if the value is all, then you want to exclude the element in the where clause (ie you don't want to add it)
Code:
$sql =" select * from table where 1=1 ";
if((string)$_POST['bedrooms'] != "ALL"){
$sql .= " and bedrooms = " . (int)$_POST['bedrooms'] ;
}
_________________
Lostboy
Cat, the other other white meat
Please read
Posting Etiquette before posting
You can always try
Google