<?php
class Note {
    public static function getNoteByDateAndPersonne($date, $personne = '') {
        $query = "SELECT * FROM note".ID_GARAGE." WHERE Date=:date AND Personne = :personne";
        $statement = Connection::getStatement($query);
        $statement->bindParam(":date", $date);
        $statement->bindParam(":personne", $personne);
        $statement->execute();
        return $statement->fetchAll();
    }    

    public static function getNoteByDate($date, $personne = '') {
        $query = "SELECT * FROM note".ID_GARAGE." WHERE Date=:date";
        $statement = Connection::getStatement($query);
        $statement->bindParam(":date", $date);
        $statement->execute();
        return $statement->fetchAll();
    }
}