1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| switch($typeBoat)
{
case mono:
$query="SELECT ID, name, cabines, pers, loa, motorisation, basedepus, hull FROM boat WHERE hull LIKE '%mono%' AND basedepus LIKE '%".$userZone."%' ORDER BY loa DESC";
break;
case cata:
$query="SELECT ID, name, cabines, pers, loa, motorisation, basedepus, hull FROM boat WHERE hull LIKE '%cata%' AND basedepus LIKE '%".$userZone."%' ORDER BY loa DESC";
break;
case motoryacht:
$query="SELECT ID, name, cabines, pers, loa, motorisation, basedepus, hull FROM boat WHERE hull LIKE '%motoryacht%' AND basedepus LIKE '%".$userZone."%' ORDER BY loa DESC";
break;
default:
$query="SELECT ID, name, cabines, pers, loa, motorisation, basedepus, hull FROM boat WHERE (hull LIKE '%mono%' OR hull LIKE '%cata%' OR hull LIKE '%motoryacht%') AND basedepus LIKE '%".$userZone."%' ORDER BY loa DESC";
break;
} |
Partager