<?
$sql_dss = " select *
from house h, facility f, public p
where h.HouseID = p.HouseID
and h.HouseID = f.HouseID ";
switch($_REQUEST['Price'])
{
case 0 : switch($_REQUEST['Bedroom']
{
case 0 : $sql_dss.= " and h.Price is Null and h.Zone is Null"; break;
case 1 : $sql_dss.= " and h.Price is Null and h.Zone like 'บ%' "; break;
case 2 : $sql_dss.= " and h.Price is Null and h.Zone like 'ศ%' "; break;
}
case 1 : $sql_dss.= " and h.Price < 2000000 "; break;
case 2 : $sql_dss.= " and h.Price between 2000000 and 5000000 "; break;
case 5 : $sql_dss.= " and h.Price >5000000 "; break;
}
$result_dss = mysql_query($sql_dss) or die ( mysql_error()) ;
$arr_dss = mysql_fetch_array($result_dss);
print_r ($arr_dss);
?>