<?php
class AlertesVehicules {
    public static function getAlerteVehiculeActifByNoChassis($noChassis) {
        $query = "SELECT * FROM alertes_vehicules WHERE NoChasis = :nochassis AND Etat = 'actif'";
        $statement = Connection::getStatement($query);
        $statement->bindParam(":nochassis", $noChassis);
        $statement->execute();
        return $statement->fetchAll();
    }

    public static function getAlerteVehiculeByNoChassis($noChassis) {
        $query = "SELECT * FROM alertes_vehicules WHERE NoChasis = :nochassis";
        $statement = Connection::getStatement($query);
        $statement->bindParam(":nochassis", $noChassis);
        $statement->execute();
        return $statement->fetchAll();
    }
}