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

stats

parent 700add68
Branches
No related tags found
No related merge requests found
...@@ -76,7 +76,7 @@ class Stats ...@@ -76,7 +76,7 @@ class Stats
LIMIT 3" ); // on prépare notre requête LIMIT 3" ); // on prépare notre requête
$requete_prepare->execute(); $requete_prepare->execute();
$ligne = $requete_prepare->fetch(PDO::FETCH_ASSOC); $ligne = $requete_prepare->fetchAll(PDO::FETCH_ASSOC);
return $ligne; return $ligne;
} }
......
...@@ -36,4 +36,24 @@ ...@@ -36,4 +36,24 @@
<?php endforeach; ?> <?php endforeach; ?>
</tbody> </tbody>
</table> </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> </div>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment