<?php
class TableData {
    public static function getTableDataByNoRechercheAndNoVisu($noRecherche, $noVisu) {
        $query = "SELECT * FROM tabledata WHERE NoTable=:norecherche AND NoVisu=:novisu";
        $statement = Connection::getStatement($query);
        $statement->bindParam(":norecherche", $noRecherche);
        $statement->bindParam(":novisu", $noVisu);
        $statement->execute();
        return $statement->fetch();
    }

    public static function getTableDataByNoTable($noTable) {
        $query = "SELECT * FROM tabledata WHERE NoTable=:notable";
        $statement = Connection::getStatement($query);
        $statement->bindParam(":notable", $noTable);
        $statement->execute();
        return $statement->fetch();
    } 
}