<?php
class Caisse {
    public static function getOneLesserDate($date) {
        $query = "SELECT * FROM caisse".ID_GARAGE." WHERE Date<=:date ORDER BY Date DESC LIMIT 0, 1";
        $statement = Connection::getStatement($query);
        $statement->bindParam(":date", $date);
        $statement->execute();
        return $statement->fetch();
    }    
}