<?php
class LogInventaire {
    public static function getLogInventaire($poste = null){
        if(is_null($poste)){
            $poste = $_SERVER["REMOTE_ADDR"];
        }
        $query = "SELECT * FROM log_inventaire".ID_GARAGE." WHERE Poste = :poste ORDER BY Date DESC LIMIT 500";;
        $statement = Connection::getStatement($query);
        $statement->bindParam(":poste", $poste);
        $statement->execute();
        return $statement->fetchAll();
    }
}