<?php
class GroupeUsers {

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

    
    public static function getByNoGroupUser($noGroupUser) {
        $query = "SELECT * FROM groupeusers WHERE NoGroupeUsers=:nogroupuser";
        $statement = Connection::getStatement($query);
        $statement->bindParam(":nogroupuser", $noGroupUser);
        $statement->execute();
        return $statement->fetch();
    }
}