<?php
class GroupeDivisionRecherche {

    public static function getAll() {
        $query = "SELECT * FROM groupedivisionrecherche";
        $statement = Connection::getStatement($query);
        $statement->execute();
        return $statement->fetchAll();
    }

    public static function getByGroupeAndTableAndVisu($groupe, $table, $visu) {
        $query = "SELECT * FROM groupedivisionrecherche WHERE NoGroupe=:groupe AND NoTable=:table AND NoVisu=:visu";
        $statement = Connection::getStatement($query);
        $statement->bindParam(":groupe", $groupe);
        $statement->bindParam(":table", $table);
        $statement->bindParam(":visu", $visu);
        $statement->execute();
        return $statement->fetch();
    }
}