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:
@ -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();
|
||||
}
|
Reference in New Issue
Block a user