Tagesplan first Stand

This commit is contained in:
Samuel Wolff 2024-01-18 10:12:14 +01:00
parent bbb5ebcbac
commit 1f2789eead

View File

@ -69,7 +69,23 @@ class TagesplanModel extends Database
public function getGerichteOnTag() public function getGerichteOnTag()
{ {
$pdo = $this->linkDB();
$datum = $_GET["datum"];
$sql = "SELECT * FROM Tagesplan LEFT JOIN GibtsAm ON Tagesplan.id = GibtsAm.tid LEFT JOIN Gericht ON GibtsAm.gid = Gericht.id WHERE Tagesplan.datum = $datum";
try {
$stmt = $pdo->prepare($sql);
$stmt->execute();
} catch (\PDOException $e) {
echo $sql . " This do be faulty";
return false;
}
$result = $stmt->fetchAll(\PDO::FETCH_ASSOC);
return $result;
} }
} }