";
$result = mysql_query( "select PAYS.ID_PAYS, PAYS.LIBELLE, COUNT(*) as SOMME from PAYS,INDIVIDUS where PAYS.ID_PAYS='$PAYS' and PAYS.ID_PAYS=INDIVIDUS.ID_PAYS_NAISSANCE and ID_PAYS<>'999999' GROUP BY PAYS.ID_PAYS, PAYS.LIBELLE ORDER BY PAYS.LIBELLE, PAYS.ID_PAYS");
while($row = mysql_fetch_array($result))
{
echo "
$row[LIBELLE] ($row[SOMME])
";
if($ZONE!="")
{
$result_pays = mysql_query( "select ZONES.CODE, ZONES.ID_ZONE, ZONES.LIBELLE, COUNT(*) as SOMME from ZONES,INDIVIDUS where ZONES.ID_ZONE='$ZONE' and ZONES.ID_PAYS='$row[ID_PAYS]' and ZONES.ID_ZONE=INDIVIDUS.ID_ZONE_NAISSANCE and ZONES.ID_PAYS=INDIVIDUS.ID_PAYS_NAISSANCE and ID_ZONE<>'999999' GROUP BY ZONES.CODE, ZONES.ID_ZONE, ZONES.LIBELLE ORDER BY ZONES.CODE, ZONES.LIBELLE, ZONES.ID_ZONE");
}
else
{
$result_pays = mysql_query( "select ZONES.CODE, ZONES.ID_ZONE, ZONES.LIBELLE, COUNT(*) as SOMME from ZONES,INDIVIDUS where ZONES.ID_PAYS='$row[ID_PAYS]' and ZONES.ID_ZONE=INDIVIDUS.ID_ZONE_NAISSANCE and ZONES.ID_PAYS=INDIVIDUS.ID_PAYS_NAISSANCE and ID_ZONE<>'999999' GROUP BY ZONES.CODE, ZONES.ID_ZONE, ZONES.LIBELLE ORDER BY ZONES.CODE, ZONES.LIBELLE, ZONES.ID_ZONE");
}
while($row_pays = mysql_fetch_array($result_pays))
{
echo "