Merge remote-tracking branch 'origin/main'

# Conflicts:
#	Views/Welcome/showWelcome.phtml
This commit is contained in:
2025-07-11 10:12:57 +02:00
3 changed files with 88 additions and 80 deletions

View File

@@ -190,6 +190,23 @@ class UserModel extends Database
die;
}
}
public function getAllCourses() {
$pdo = $this->linkDB();
$sql = "SELECT k.id, k.name, k.preis, k.dauer, k.rabatt, k.kategorie, k.beschreibung, k.ort_id,
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";
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;
}
}
public function updateCourse($course) {