1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
if (isset($_GET['age_max'])) $_GET['age_max']=(age($_GET['age_max']));
if (isset($_GET['age_min'])) $_GET['age_min']=(age($_GET['age_min']));
$sql="select * from profil,region, pays where profil.idreg=region.id_region and pays.idpays=profil.idpays";
if ($_GET['idreg']){
$sql.= " and region.id_region = '".$_GET['idreg']."'";
}
if ($_GET['sexe']){
$sql.= " and profil.sexe = '".$_GET['sexe']."'";
}
if ($_GET['idpays']){
$sql.= " and profil.idpays = '".$_GET['idpays']."'";
}
if ($_GET['img']){
$sql.= " and profil.photo <> 'no-thumb.jpg'";
}
if ($_GET['statut']){
$sql.= " and profil.statut = '".$_GET['statut']."'";
}
if ($_GET['age_max']){
$sql.= " and profil.datenaiss <= '$_GET[age_max]'";
}
if ($_GET['age_min']){
$sql.= " and profil.datenaiss >= '$_GET[age_min]'";
}
//if($_GET[prix]){ $query_rs .= " and annonce.prix >='$_GET[prix]' ";}
$result=mysqli_query($conn,$sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysqli_error($conn)); |
Partager