<?php
class GroupeDivision {

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

    
    public static function getByGroupeAndTableAndVisu($groupe, $table, $visu) {
        $query = "SELECT * FROM groupedivision 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();
    }
}