";
$req="select PATRONYMES.ID_PATRONYME, PATRONYMES.LIBELLE_ORD, COUNT(*) as SOMME from PATRONYMES,INDIVIDUS where PATRONYMES.ID_PATRONYME=INDIVIDUS.ID_PATRONYME GROUP BY PATRONYMES.ID_PATRONYME, PATRONYMES.LIBELLE, PATRONYMES.LIBELLE_ORD having (ASCII(upper(left(PATRONYMES.LIBELLE_ORD,1)))<65 or ASCII(upper(left(PATRONYMES.LIBELLE_ORD,1)))>90) ORDER BY PATRONYMES.LIBELLE_ORD, PATRONYMES.ID_PATRONYME";
}
else
{
echo "
";
$req="select PATRONYMES.ID_PATRONYME, PATRONYMES.LIBELLE_ORD, COUNT(*) as SOMME from PATRONYMES,INDIVIDUS where PATRONYMES.ID_PATRONYME=INDIVIDUS.ID_PATRONYME GROUP BY PATRONYMES.ID_PATRONYME, PATRONYMES.LIBELLE, PATRONYMES.LIBELLE_ORD having upper(left(PATRONYMES.LIBELLE_ORD,1))='$INITIALE' ORDER BY PATRONYMES.LIBELLE_ORD, PATRONYMES.ID_PATRONYME";
}
mysql_query("SET OPTION SQL_BIG_SELECTS=1") or die(": FAILED");
$result = mysql_query( $req );
echo "
";
$INITIALE=$_REQUEST["INITIALE"];
if($INITIALE=="AUTRES" || $INITIALE=="")
{
$result = mysql_query( "select COUNT(*) as SOMME from PATRONYMES,INDIVIDUS where PATRONYMES.ID_PATRONYME=INDIVIDUS.ID_PATRONYME and (ASCII(upper(left(PATRONYMES.LIBELLE_ORD,1)))<65 or ASCII(upper(left(PATRONYMES.LIBELLE_ORD,1)))>90 or PATRONYMES.LIBELLE_ORD='')");
if($row = mysql_fetch_array($result))
{
affiche_liste_patro("AUTRES", $row[SOMME]);
}
}
if($INITIALE=="")
{
$result = mysql_query( "select upper(left(PATRONYMES.LIBELLE_ORD,1)) as INITIALE, COUNT(*) as SOMME from PATRONYMES,INDIVIDUS where PATRONYMES.ID_PATRONYME=INDIVIDUS.ID_PATRONYME and (ASCII(upper(left(PATRONYMES.LIBELLE_ORD,1)))>=65 and ASCII(upper(left(PATRONYMES.LIBELLE_ORD,1)))<=90) GROUP BY INITIALE");
}
else
{
$result = mysql_query( "select upper(left(PATRONYMES.LIBELLE_ORD,1)) as INITIALE, COUNT(*) as SOMME from PATRONYMES,INDIVIDUS where PATRONYMES.ID_PATRONYME=INDIVIDUS.ID_PATRONYME and upper(left(PATRONYMES.LIBELLE_ORD,1))='$INITIALE' GROUP BY INITIALE");
}
while($row = mysql_fetch_array($result))
{
affiche_liste_patro($row[INITIALE], $row[SOMME]);
}
affiche_pied_page(true);
?>