function printGamesRow($id1, $id2) { global $commands1; global $commands2; global $players1; global $players2; return '<tr align=center>'. '<td>'.printGames($commands1[$id1], $commands1[$id2], $players1[$commands1[$id1]], $players1[$commands1[$id2]]).'</td>'. '<td>'.printGames($commands2[$id1], $commands2[$id2], $players2[$commands2[$id1]], $players2[$commands2[$id2]]).'</td>'. '</tr>'; }
function findAllGamesATeamIsAPartOf($teamID, $gameStatus) { $query = "select * from game where \n game.Game_Finished = {$gameStatus} and (\n game.Teams like '{$teamID},%'\n or game.Teams like '%,{$teamID}'\n or game.Teams like '%,{$teamID},%'\n or game.Teams like '{$teamID}')"; $conn = connectToDatabase(); $result = $conn->query($query); printGames($result, $teamID); }