Standardmethoden für Standort und News.Events erweitert

This commit is contained in:
2025-06-23 11:10:46 +02:00
parent 6e3e3708b2
commit 1964cadd8c
10 changed files with 278 additions and 3 deletions

22
Model/StandortModel.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
namespace Blog\Model;
use PDOException;
class StandortModel extends Database {
public function getStandorte() {
$pdo = $this->linkDB();
$sql = "SELECT * from standort ORDER BY ort;";
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;
}
}
}