From 29a29645285d13fe1e71972af908bcbbe3072e3a Mon Sep 17 00:00:00 2001 From: Rob <117313375+RobtopHBY@users.noreply.github.com> Date: Mon, 23 Jan 2023 19:57:43 +0100 Subject: [PATCH] Insert Methode Model mit Insert Methode (CreateProjects) --- codeigniter/app/Models/ProjekteModel.php | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 codeigniter/app/Models/ProjekteModel.php diff --git a/codeigniter/app/Models/ProjekteModel.php b/codeigniter/app/Models/ProjekteModel.php new file mode 100644 index 0000000..e77f932 --- /dev/null +++ b/codeigniter/app/Models/ProjekteModel.php @@ -0,0 +1,30 @@ + $_POST['Projektname'], + 'description' => $_POST['Projektbeschreibung'] + + ); + $projects = $this->db->table('projects'); + //$this->db->insert('projects', $data); + $db->query('INSERT INTO projects(id,description)VALUES("'.$id.'","'.$description.'")'); + } + public function updateProject($id, $description) { + $data = array( + 'id' => $id, + 'description' => $description + ); + $this->db->where('id', $id); + $this->db->update('projects', $data); + } + +} \ No newline at end of file