From 05d6dec5047d94135b936ed8dd025d9900d4d0d7 Mon Sep 17 00:00:00 2001 From: Mohammad Reda Mohammad Date: Fri, 5 Sep 2025 12:07:49 +0200 Subject: [PATCH] =?UTF-8?q?Model/ProjectModel.php=20gel=C3=B6scht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Model/ProjectModel.php | 49 ------------------------------------------ 1 file changed, 49 deletions(-) delete mode 100644 Model/ProjectModel.php diff --git a/Model/ProjectModel.php b/Model/ProjectModel.php deleted file mode 100644 index a544c42..0000000 --- a/Model/ProjectModel.php +++ /dev/null @@ -1,49 +0,0 @@ -linkDB(); - $sql = "SELECT * FROM users"; - - try { - $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - } catch (\PDOException $e) { - new Msg(true, null, $e); - } - - $sth = $pdo->prepare($sql); - $sth->execute(); - - $result = $sth->fetchAll(\PDO::FETCH_ASSOC); - $sth->closeCursor(); - $pdo = null; - // fetch all - return $result; - - } - public function insertNewMediaType($data) - { - $pdo = $this->linkDB(); - - try { - // it should add an new type and it is Files - $sql = "INSERT INTO media_types (id, type) - VALUES (:id, :type)"; - $sth = $pdo->prepare($sql); - $sth-> execute([ - ':id' => $this->createUUID(), - ':type' => $data['Files'] - ]); - - $pdo = null; - - new Msg(false, "Medientyp erfolgreich eingefügt."); - } catch (\PDOException $e) { - new Msg(true, 'Fehler beim Einfügen des Medientyps', $e); - } - } -} \ No newline at end of file