"; display_lng_text("DETAIL_ZONE_TITLE"); echo ""; $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 "

$row_pays[CODE] $row_pays[LIBELLE] ($row_pays[SOMME])

"; mysql_query("SET OPTION SQL_BIG_SELECTS=1") or die(": FAILED"); $sql_query = "select VILLES.CODE, VILLES.ID_VILLE, VILLES.LIBELLE, COUNT(*) as SOMME "; $sql_query .= "from VILLES, INDIVIDUS "; $sql_query .= "where INDIVIDUS.ID_ZONE_NAISSANCE='$row_pays[ID_ZONE]' and INDIVIDUS.ID_PAYS_NAISSANCE='$row[ID_PAYS]' "; $sql_query .= "and VILLES.ID_ZONE='$row_pays[ID_ZONE]' and VILLES.ID_PAYS='$row[ID_PAYS]' "; $sql_query .= "and VILLES.ID_VILLE=INDIVIDUS.ID_VILLE_NAISSANCE "; $sql_query .= "group by VILLES.CODE, VILLES.ID_VILLE, VILLES.LIBELLE "; $sql_query .= "order by VILLES.LIBELLE, VILLES.CODE "; $result_ville = mysql_query( $sql_query ); while($row_ville = mysql_fetch_array($result_ville)) { echo "

$row_ville[LIBELLE] $row_ville[CODE] ($row_ville[SOMME])

"; $sql_query = "select PATRONYMES.LIBELLE, INDIVIDUS.PRENOM, INDIVIDUS.ID_INDIVIDU "; $sql_query .= "from INDIVIDUS, PATRONYMES "; $sql_query .= "where INDIVIDUS.ID_PATRONYME=PATRONYMES.ID_PATRONYME and INDIVIDUS.ID_VILLE_NAISSANCE='$row_ville[ID_VILLE]' and INDIVIDUS.ID_PAYS_NAISSANCE='$row[ID_PAYS]' and INDIVIDUS.ID_ZONE_NAISSANCE='$row_pays[ID_ZONE]' "; $sql_query .= "order by PATRONYMES.LIBELLE, INDIVIDUS.PRENOM "; $result_ind = mysql_query( $sql_query ); while($row_ind = mysql_fetch_array($result_ind)) { echo "$row_ind[LIBELLE] $row_ind[PRENOM]
"; } } // Unknown places of the zone $sql_query = "select PATRONYMES.LIBELLE, INDIVIDUS.PRENOM, INDIVIDUS.ID_INDIVIDU "; $sql_query .= "from INDIVIDUS, PATRONYMES "; $sql_query .= "where INDIVIDUS.ID_PATRONYME=PATRONYMES.ID_PATRONYME and INDIVIDUS.ID_VILLE_NAISSANCE='999999' and INDIVIDUS.ID_ZONE_NAISSANCE='$row_pays[ID_ZONE]' and INDIVIDUS.ID_PAYS_NAISSANCE='$row[ID_PAYS]' "; $sql_query .= "order by PATRONYMES.LIBELLE, INDIVIDUS.PRENOM"; $result_ind = mysql_query( $sql_query ); if($row_ind = mysql_fetch_array($result_ind)) { echo "

"; display_lng_text("DETAIL_ZONE_UNKNOWN"); echo "

"; echo "$row_ind[LIBELLE] $row_ind[PRENOM]
"; while($row_ind = mysql_fetch_array($result_ind)) { echo "$row_ind[LIBELLE] $row_ind[PRENOM]
"; } } } // Unknown places of the country $sql_query = "select PATRONYMES.LIBELLE, INDIVIDUS.PRENOM, INDIVIDUS.ID_INDIVIDU "; $sql_query .= "from INDIVIDUS, PATRONYMES "; $sql_query .= "where INDIVIDUS.ID_PATRONYME=PATRONYMES.ID_PATRONYME and INDIVIDUS.ID_VILLE_NAISSANCE='999999' and INDIVIDUS.ID_ZONE_NAISSANCE='999999' and INDIVIDUS.ID_PAYS_NAISSANCE='$row[ID_PAYS]' "; $sql_query .= "order by PATRONYMES.LIBELLE, INDIVIDUS.PRENOM"; $result_ind = mysql_query( $sql_query ); if($row_ind = mysql_fetch_array($result_ind)) { echo "

"; display_lng_text("DETAIL_ZONE_UNKNOWN_CNTRY"); echo "

"; echo "$row_ind[LIBELLE] $row_ind[PRENOM]
"; while($row_ind = mysql_fetch_array($result_ind)) { echo "$row_ind[LIBELLE] $row_ind[PRENOM]
"; } } } affiche_pied_page(true); ?>