diff --git a/Codeigniter 4.0 testing/controllers/perfectcontroller.php b/Codeigniter 4.0 testing/controllers/perfectcontroller.php deleted file mode 100644 index 56e44d0..0000000 --- a/Codeigniter 4.0 testing/controllers/perfectcontroller.php +++ /dev/null @@ -1,66 +0,0 @@ -load->model('mdl_perfectcontroller'); -$query = $this->mdl_perfectcontroller->get($order_by); -return $query; -} - -function get_with_limit($limit, $offset, $order_by) { -$this->load->model('mdl_perfectcontroller'); -$query = $this->mdl_perfectcontroller->get_with_limit($limit, $offset, $order_by); -return $query; -} - -function get_where($id) { -$this->load->model('mdl_perfectcontroller'); -$query = $this->mdl_perfectcontroller->get_where($id); -return $query; -} - -function get_where_custom($col, $value) { -$this->load->model('mdl_perfectcontroller'); -$query = $this->mdl_perfectcontroller->get_where_custom($col, $value); -return $query; -} - -function _insert($data) { -$this->load->model('mdl_perfectcontroller'); -$this->mdl_perfectcontroller->_insert($data); -} - -function _update($id, $data) { -$this->load->model('mdl_perfectcontroller'); -$this->mdl_perfectcontroller->_update($id, $data); -} - -function _delete($id) { -$this->load->model('mdl_perfectcontroller'); -$this->mdl_perfectcontroller->_delete($id); -} - -function count_where($column, $value) { -$this->load->model('mdl_perfectcontroller'); -$count = $this->mdl_perfectcontroller->count_where($column, $value); -return $count; -} - -function get_max() { -$this->load->model('mdl_perfectcontroller'); -$max_id = $this->mdl_perfectcontroller->get_max(); -return $max_id; -} - -function _custom_query($mysql_query) { -$this->load->model('mdl_perfectcontroller'); -$query = $this->mdl_perfectcontroller->_custom_query($mysql_query); -return $query; -} - -} \ No newline at end of file diff --git a/Codeigniter 4.0 testing/models/perfectmodel.php b/Codeigniter 4.0 testing/models/perfectmodel.php deleted file mode 100644 index 2b7a1b2..0000000 --- a/Codeigniter 4.0 testing/models/perfectmodel.php +++ /dev/null @@ -1,88 +0,0 @@ -get_table(); -$this->db->order_by($order_by); -$query=$this->db->get($table); -return $query; -} - -function get_with_limit($limit, $offset, $order_by) { -$table = $this->get_table(); -$this->db->limit($limit, $offset); -$this->db->order_by($order_by); -$query=$this->db->get($table); -return $query; -} - -function get_where($id) { -$table = $this->get_table(); -$this->db->where('id', $id); -$query=$this->db->get($table); -return $query; -} - -function get_where_custom($col, $value) { -$table = $this->get_table(); -$this->db->where($col, $value); -$query=$this->db->get($table); -return $query; -} - -function _insert($data) { -$table = $this->get_table(); -$this->db->insert($table, $data); -} - -function _update($id, $data) { -$table = $this->get_table(); -$this->db->where('id', $id); -$this->db->update($table, $data); -} - -function _delete($id) { -$table = $this->get_table(); -$this->db->where('id', $id); -$this->db->delete($table); -} - -function count_where($column, $value) { -$table = $this->get_table(); -$this->db->where($column, $value); -$query=$this->db->get($table); -$num_rows = $query->num_rows(); -return $num_rows; -} - -function count_all() { -$table = $this->get_table(); -$query=$this->db->get($table); -$num_rows = $query->num_rows(); -return $num_rows; -} - -function get_max() { -$table = $this->get_table(); -$this->db->select_max('id'); -$query = $this->db->get($table); -$row=$query->row(); -$id=$row->id; -return $id; -} - -function _custom_query($mysql_query) { -$query = $this->db->query($mysql_query); -return $query; -} - -} \ No newline at end of file