From fc25ddff4cb05759cd63d714122b2f6c85a3e0a6 Mon Sep 17 00:00:00 2001 From: "mael.daim" Date: Tue, 9 Jan 2024 10:41:08 +0100 Subject: [PATCH] fixed the bugs that get all the team instead of the users ones + format --- front/views/Editor.tsx | 4 ++-- front/views/Home.tsx | 4 ++-- front/views/template/Header.tsx | 2 +- src/Core/Gateway/TeamGateway.php | 14 ++++++++++---- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/front/views/Editor.tsx b/front/views/Editor.tsx index cee7b98..cbb2da5 100644 --- a/front/views/Editor.tsx +++ b/front/views/Editor.tsx @@ -32,7 +32,7 @@ import { CourtAction } from "./editor/CourtAction" import { BasketCourt } from "../components/editor/BasketCourt" import { ratioWithinBase } from "../components/arrows/Pos" import { Action, ActionKind } from "../model/tactic/Action" -import {BASE} from "../Constants"; +import { BASE } from "../Constants" const ERROR_STYLE: CSSProperties = { borderColor: "red", @@ -399,7 +399,7 @@ function EditorView({ Home
- +
> + * @param int $user + * @return array */ public function getAll(int $user): array { - return $this->con->fetch("SELECT * FROM Team", []); + return $this->con->fetch( + "SELECT t.* FROM team t,Member m WHERE m.id_team = t.id AND m.id_user= :idUser ", + [ + "idUser" => [$user, PDO::PARAM_INT], + ] + ); } + }