1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-25 06:20:36 +02:00

Amélioration des fichiers d'ajout de tournoi

This commit is contained in:
galaxyoyo
2019-09-07 18:08:40 +02:00
parent 0f0c082437
commit 8606ae7b95
8 changed files with 129 additions and 93 deletions

View File

@ -111,4 +111,12 @@ function trigramExists($trigram) {
$req = $DB->prepare("SELECT `id` FROM `teams` WHERE `trigram` = ? AND `year` = '$YEAR';");
$req->execute([$trigram]);
return $req->fetch();
}
function tournamentExists($name) {
global $DB, $YEAR;
$req = $DB->prepare("SELECT `id` FROM `tournaments` WHERE `name` = ? AND `year` = '$YEAR';");
$req->execute([$name]);
return $req->fetch();
}