Compare commits

...

4 Commits

Author SHA1 Message Date
93e3b8e0c8 Merge branch 'Tagesplan' into Testing 2024-01-18 10:24:16 +01:00
64b6aa2716 sql funzt 2024-01-18 10:21:52 +01:00
34ae68bfdc zweiter Stand 2024-01-18 10:16:56 +01:00
1f2789eead Tagesplan first Stand 2024-01-18 10:12:14 +01:00

View File

@ -69,7 +69,23 @@ class TagesplanModel extends Database
public function getGerichteOnTag() public function getGerichteOnTag()
{ {
$pdo = $this->linkDB();
$datum = $_GET["datum"];
$sql = "SELECT Gericht.id, Gericht.name, Gericht.preis, Gericht.beschreibung FROM Gericht LEFT JOIN GibtsAm ON Gericht.id = GibtsAm.gid LEFT JOIN Tagesplan ON GibtsAm.tid = Tagesplan.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;
} }
} }