From 739f583a330429df2751c6e6ceb6768ad251c9ad Mon Sep 17 00:00:00 2001 From: William Date: Mon, 21 Mar 2022 11:39:25 +0100 Subject: [PATCH] Commit --- app/lib/App/Teamtable/TeamMapper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/App/Teamtable/TeamMapper.php b/app/lib/App/Teamtable/TeamMapper.php index eb2c744..621bca6 100644 --- a/app/lib/App/Teamtable/TeamMapper.php +++ b/app/lib/App/Teamtable/TeamMapper.php @@ -57,7 +57,7 @@ class TeamMapper public function getByCardnumber(string $cardnumber): ?Team { - $sth = $this->dbh->prepare('SELECT * FROM lagtabell WHERE Kortnummer = ?'); + $sth = $this->dbh->prepare('SELECT * FROM lagtabell WHERE Kortnummer = ? LIMIT 1'); $sth->execute([$cardnumber]); $row = $sth->fetch(PDO::FETCH_ASSOC); if ($row) @@ -69,7 +69,7 @@ class TeamMapper public function get(int $id): ?Team { - $sth = $this->dbh->prepare('SELECT * FROM lagtabell WHERE LagID = ?'); + $sth = $this->dbh->prepare('SELECT * FROM lagtabell WHERE LagID = ? LIMIT 1'); $sth->execute([$id]); $row = $sth->fetch(PDO::FETCH_ASSOC); if ($row)