kleine ui fixes

This commit is contained in:
2025-07-04 16:50:03 +02:00
parent b5118a699f
commit 7ce389d179
8 changed files with 299 additions and 201 deletions

View File

@@ -59,4 +59,23 @@ class AdminModel extends Database
return true;
}
public function getMyCourses() {
$sql = "SELECT k.id, k.name, k.preis, k.dauer, k.rabatt, k.kategorie, k.beschreibung, o.stadt, o.strasse, o.plz, b.note, b.kommentar
FROM kurs AS k
JOIN ort AS o ON o.id = k.ort_id
LEFT JOIN bewertungen AS b ON b.kurs_id = k.id
ORDER BY k.name;";
$pdo = $this->linkDB();
try {
$sth = $pdo->prepare($sql);
$sth->execute();
return $sth->fetchAll(\PDO::FETCH_ASSOC);
} catch (PDOException $e) {
new \Blog\Library\ErrorMsg("Fehler beim Lesen der Daten.", $e);
die;
}
}
}