Skip to content
Snippets Groups Projects
Commit 9d2e32ba authored by goujonpa's avatar goujonpa
Browse files

Merge branch 'master' of gitlab.utc.fr:nf17-camp-p14/clivi

parents 61d2ba93 0bfca3b6
No related branches found
No related tags found
No related merge requests found
......@@ -152,7 +152,7 @@ class Stats
{
$bdd = new Db();
$requete_prepare = $bdd->db->prepare(" SELECT e.nom, e.prenom, COUNT(*) AS c
$requete_prepare = $bdd->db->prepare(" SELECT e.nom, e.prenom, COUNT(*) AS count
FROM employe e, rdv r
WHERE e.id = r.employe
AND e.is_veterinaire = '1'
......@@ -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;
}
......
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment