course-seite ohne styles

This commit is contained in:
2025-07-11 10:41:58 +02:00
parent 07a56b31a6
commit e426926692
4 changed files with 16 additions and 17 deletions

View File

@@ -10,9 +10,11 @@ class CourseModel extends Database
{
public function getCourseById(string $id){
$pdo = $this->linkDB();
$sql = "SELECT k.*, o.stadt, o.strasse, o.plz
$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 k
JOIN ort o ON k.ort_id = o.id
LEFT JOIN bewertungen AS b ON b.kurs_id = k.id
WHERE k.id = :id";
$sth = $pdo->prepare($sql);
$sth->execute([':id' => $id]);