This commit is contained in:
William 2022-03-21 11:39:25 +01:00
parent 6ac584b36a
commit 739f583a33

View File

@ -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)