function recherchePopMaxEtMin($bdd, $populationMax, $populationMin, $page) { $stmt = $bdd->prepare("SELECT region, dept, comm, nom, population, latitude, longitude FROM public.communes WHERE population <= {$populationMax} AND population >= {$populationMin}"); $stmt->execute(); $stmt->setFetchMode(PDO::FETCH_ASSOC); //Affichage affichageParListeDe15('null', 'null', $populationMin, $populationMax, $stmt->fetchAll(), $page); }
function rechercheRegionDepartement($bdd, $resultat, $page) { $code_region_dept = $resultat; $stmt = $bdd->prepare("SELECT region, dept, comm, nom, population, latitude, longitude FROM public.communes WHERE region='{$code_region_dept}' OR dept='{$code_region_dept}'"); $stmt->execute(); $stmt->setFetchMode(PDO::FETCH_ASSOC); //Affichage affichageParListeDe15($code_region_dept, 'null', 'null', 'null', $stmt->fetchAll(), $page); }