Skip to content
Snippets Groups Projects
Commit 7176def0 authored by cortylal's avatar cortylal
Browse files

stats

parent a890db2c
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ class Stats
GROUP BY c.nom, c.prenom, c.id" ); // 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;
}
......
......@@ -56,4 +56,25 @@
<?php endforeach; ?>
</tbody>
</table>
<br/>
<hr/>
<h4>Nombre d'animaux par client</h4>
<table class="table">
<thead>
<th>Nom </th>
<th>Prenom </th>
<th>Nombre d'animaux </th>
</thead>
<tbody>
<?php foreach ($stats->nbAnimalClient() as $ligne): ?>
<tr>
<td><?php echo $ligne["nom"]; ?> </td>
<td><?php echo $ligne["prenom"]; ?> </td>
<td><?php echo $ligne["count"]; ?> </td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
\ No newline at end of file
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