1 2 3 4 5 6 7 8 9 10 11
| $query = mysql_query("SELECT AGENC, LIBELLE_ACTION, sum(NB_TOT), sum(NB_RDV), sum(NB_TRA) FROM m41000 WHERE DGAA='$indicatif' and CCIBLE=0 and LIBELLE_ACTION='$libelle' GROUP by AGENC") or die (mysql_error());
while ($array = mysql_fetch_assoc($query)) {
$indicatif_agence=$array['AGENC'];
$query0 = mysql_query("SELECT DISTINCT lib_ag FROM structure WHERE ind_agence='$indicatif_agence' ORDER by lib_ag") or die (mysql_error());
while ($array0 = mysql_fetch_assoc($query0)) {
print $array0['lib_ag'];
print $array['sum(NB_TOT)'];
print $array['sum(NB_RDV)'];
print $array['sum(NB_TRA)'];
}
} |
Partager