1 2 3 4 5 6 7 8 9 10 11 12 13 14
| $tri = $_GET["tri"];
$query_rs="SELECT annonce.idannonce, annonce.km, annonce.modele, marque.marque, membre.statut, annonce.km, annonce.energie, annonce.prix, annonce.am, region.name
FROM annonce, marque,membre, region
WHERE marque.idmarque = annonce.idmarque and membre.idmembre=annonce.idmembre and membre.idreg=region.idreg and annonce.visible='oui' order by '$tri' ";
if($_GET[idmarque]){ $query_rs .= " AND marque.idmarque='$_GET[idmarque]' ";}
if($_GET[modele]){ $query_rs .= " AND modele='$_GET[modele]' ";}
if($_GET[energie]){ $query_rs .= " and energie='$_GET[energie]' ";}
if($_GET[type]){ $query_rs .= " and type='$_GET[type]' ";}
if($_GET[idreg]){ $query_rs .= " and region.idreg='$_GET[idreg]' ";}
if($_GET[statut]){ $query_rs .= " and membre.statut ='$_GET[statut]' ";}
if($_GET[am]){ $query_rs .= " and annonce.am >='$_GET[am]' ";}
if($_GET[am2]){ $query_rs .= " and annonce.am <='$_GET[am]' ";}
if($_GET[prix]){ $query_rs .= " and annonce.prix >='$_GET[prix]' ";}
if($_GET[prix2]){ $query_rs .= " and annonce.prix <='$_GET[prix2]' ";} |
Partager