Nested Switch statement

OK, what wrong with my nested case?


switch ($type)
{
    case "villa":
		switch ($bedrooms)
		{
		case 1:
			$sql_0 = "SELECT PropID,Ref,Name,Title,Location,Price FROM properties WHERE Proptype = 'villa' ORDER BY Ref ASC";
			$query1 = mysql_query($sql_0) or die("Cannot query the database.<br>" . mysql_error());
			break;
		case 2:
			$sql_0 = "SELECT PropID,Ref,Name,Title,Location,Price FROM properties WHERE Proptype = 'villa' ORDER BY Ref ASC";
			$query1 = mysql_query($sql_0) or die("Cannot query the database.<br>" . mysql_error());
			break;
		case 3:
			$sql_0 = "SELECT PropID,Ref,Name,Title,Location,Price,No_bed FROM properties WHERE Proptype = 'villa' AND No_bed ='3' ORDER BY Ref ASC";
			$query1 = mysql_query($sql_0) or die("Cannot query the database.<br>" . mysql_error());
			break;
		case 4:
			$sql_0 = "SELECT PropID,Ref,Name,Title,Location,Price FROM properties WHERE Proptype = 'villa' ORDER BY Ref ASC";
			$query1 = mysql_query($sql_0) or die("Cannot query the database.<br>" . mysql_error());
			break;
		case 5:
			$sql_0 = "SELECT PropID,Ref,Name,Title,Location,Price FROM properties WHERE Proptype = 'villa' ORDER BY Ref ASC";
			$query1 = mysql_query($sql_0) or die("Cannot query the database.<br>" . mysql_error());
			break;
		case 6:
			$sql_0 = "SELECT PropID,Ref,Name,Title,Location,Price FROM properties WHERE Proptype = 'villa' ORDER BY Ref ASC";
			$query1 = mysql_query($sql_0) or die("Cannot query the database.<br>" . mysql_error());
			break;
		default:
			$sql_0 = "SELECT PropID,Ref,Name,Title,Location,Price FROM properties WHERE Proptype = 'villa' ORDER BY Ref ASC";
			$query1 = mysql_query($sql_0) or die("Cannot query the database.<br>" . mysql_error());
			break;
		}
    case "apartments":
        $sql_0 = "SELECT PropID,Ref,Name,Title,Location,Price FROM properties WHERE Proptype = 'apartment' ORDER BY Ref ASC";
		$query1 = mysql_query($sql_0) or die("Cannot query the database.<br>" . mysql_error());
        break;
    case "plots":
        $sql_0 = "SELECT PropID,Ref,Name,Title,Location,Price FROM properties WHERE Proptype = 'plot' ORDER BY Ref ASC";
		$query1 = mysql_query($sql_0) or die("Cannot query the database.<br>" . mysql_error());
        break;
    case "houses":
        $sql_0 = "SELECT PropID,Ref,Name,Title,Location,Price FROM properties WHERE Proptype = 'house' ORDER BY Ref ASC";
		$query1 = mysql_query($sql_0) or die("Cannot query the database.<br>" . mysql_error());
        break;
    case "commercial":
        $sql_0 = "SELECT PropID,Ref,Name,Title,Location,Price FROM properties WHERE Proptype = 'commercial' ORDER BY Ref ASC";
		$query1 = mysql_query($sql_0) or die("Cannot query the database.<br>" . mysql_error());
        break;
}

If the type is villa it seems to hop that switch and use apartment. I tested with only villa as a case and it works great. Where have a missed a ; or a break?

You’re villa switch has no break;
switch()
{
case ‘villa’:
switch()
{
}
break; <– this are missing
}

LOL, I tried that didn’t work but now it does.

Sods law!