<?php
class Message {
    public static function getByAAndEtat($A, $etat = 0) {
        $query = "SELECT * FROM message".ID_GARAGE." WHERE A = :personne AND Etat = :etat ORDER BY ID DESC";
        $statement = Connection::getStatement($query);
        $statement->bindParam(":personne", $A);
        $statement->bindParam(":etat", $etat);
        $statement->execute();
        return $statement->fetchAll();
    }    
}