diff --git a/src/Model/CartManager.php b/src/Model/CartManager.php index 0a7c595..cdd7075 100644 --- a/src/Model/CartManager.php +++ b/src/Model/CartManager.php @@ -68,7 +68,7 @@ public function latestCart() public function historiqueID($id) { $statement = $this->pdo->query("SELECT p.id FROM " . self::TABLE . " p - WHERE p.id_user=$id AND p.etat= 'confirme' ORDER BY date DESC limit 1"); + WHERE p.id_user=$id AND p.etat= 'confirme' ORDER BY date DESC, id DESC limit 1"); return $statement->fetch(); }