1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-25 17:42:24 +00:00

Erreur 404 si le tournoi n'existe pas

This commit is contained in:
Yohann 2019-09-02 22:01:26 +02:00
parent 2ce1f83873
commit 10da20f2c0

View File

@ -8,6 +8,9 @@ $response = $DB->prepare("SELECT * FROM `tournaments` WHERE `name` = ? AND `year
$response->execute([$tournament_name]); $response->execute([$tournament_name]);
$data = $response->fetch(); $data = $response->fetch();
if ($data === false)
include "404.php";
$orgas_req = $DB->query("SELECT `users`.`id` AS `id`, `surname`, `first_name` FROM `users` JOIN `organizers` ON `users`.`id` = `organizer` WHERE `tournament` = " . $data["id"] . ";"); $orgas_req = $DB->query("SELECT `users`.`id` AS `id`, `surname`, `first_name` FROM `users` JOIN `organizers` ON `users`.`id` = `organizer` WHERE `tournament` = " . $data["id"] . ";");
$orgas = []; $orgas = [];
$orgas_id = []; $orgas_id = [];