1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
$Req = "
SELECT b.Libelle_Menu_niv1 as 'Lib_Page', b.Page, count(*) as 'Nb'
FROM scf_log a, scf_menu_2_niv1 b
WHERE a.Page = b.Page
GROUP BY b.Libelle_Menu_niv1, b.Page
UNION ALL
SELECT b.Libelle_Menu_niv2, b.Page, count(*)
FROM scf_log a, scf_menu_2_niv2 b
WHERE a.Page = b.Page
GROUP BY b.Libelle_Menu_niv2, b.Page
UNION ALL
SELECT b.Libelle_Menu_niv3, b.Page, count(*)
FROM scf_log a, scf_menu_2_niv3 b
WHERE a.Page = b.Page
GROUP BY b.Libelle_Menu_niv3, b.Page
UNION ALL
SELECT b.Libelle_Menu_niv4, b.Page, count(*)
FROM scf_log a, scf_menu_2_niv4 b
WHERE a.Page = b.Page
GROUP BY b.Libelle_Menu_niv4, b.Page
ORDER by 3 DESC";
try {
$dbh = $GLOBALS['bdd']->query($Req);
$Pages_Log = $dbh->fetchAll();
}
catch (PDOException $e) {
echo "<h4><br>La requete est : ".$Req;
die('<br><strong>Erreur : ' . $e->getMessage()) . "</strong></h4>";
} |
Partager