* @since v.1.0 **/ public function __construct() { parent::__construct(); //Codeigniter : Write Less Do More } public function get_data() { return $this->db->get_where("artikel")->result(); } public function insert($data) { return $this->db->table($this->table)->insert($data); } public function count_artikel() { return $this->db->count_all("artikel"); } public function get_data_edit($id) { $result = $this->db->get_where("artikel", array("id_artikel" => $id))->row_array(); if ($result !== null) { return $result; } else { // Handle the case where no matching data was found, e.g., by returning an empty array or showing an error message. return array(); // You can customize this based on your requirements. } } }