From a88defb0d36f55b27ea3057496d96a7bbac109fc Mon Sep 17 00:00:00 2001 From: cortylal <alexcortyl@gmail.com> Date: Thu, 19 Jun 2014 02:34:48 +0200 Subject: [PATCH] stats --- class/stats.php | 2 +- view/stats.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/class/stats.php b/class/stats.php index 91a28dc..3a480cf 100644 --- a/class/stats.php +++ b/class/stats.php @@ -161,7 +161,7 @@ class Stats LIMIT 5" ); // on prépare notre requête $requete_prepare->execute(); - $ligne = $requete_prepare->fetch(PDO::FETCH_ASSOC); + $ligne = $requete_prepare->fetchAll(PDO::FETCH_ASSOC); return $ligne; } diff --git a/view/stats.php b/view/stats.php index 13642df..6547cd1 100644 --- a/view/stats.php +++ b/view/stats.php @@ -103,14 +103,14 @@ <thead> <th>Nom </th> <th>Prenom </th> - <th>Montant de la facture </th> + <th>Nombre de rendez-vous </th> </thead> <tbody> <?php foreach ($stats->top5Veterinaire() as $ligne): ?> <tr> <td><?php echo $ligne["nom"]; ?> </td> <td><?php echo $ligne["prenom"]; ?> </td> - <td><?php echo $ligne["c"]; ?> </td> + <td><?php echo $ligne["count"]; ?> </td> </tr> <?php endforeach; ?> </tbody> -- GitLab