Skip to content
Snippets Groups Projects
Commit 0b6a4e74 authored by cortylal's avatar cortylal
Browse files

stats

parent 700add68
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,7 @@ class Stats
LIMIT 3" ); // 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;
}
......
......@@ -36,4 +36,24 @@
<?php endforeach; ?>
</tbody>
</table>
<br/>
<hr/>
<h4>Top 3 des plus grosses factures</h4>
<table class="table">
<thead>
<th>Nom </th>
<th>Prenom </th>
<th>Montant de la facture </th>
</thead>
<tbody>
<?php foreach ($stats->top3Facture() as $ligne): ?>
<tr>
<td><?php echo $ligne["nom"]; ?> </td>
<td><?php echo $ligne["prenom"]; ?> </td>
<td><?php echo $ligne["prix"]; ?> </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