D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
public_html
/
ci_panel
/
application
/
models
/
Filename :
Committee_model.php
back
Copy
<?php class Committee_model extends CI_model{ public function get_committee() { # code... $this->db->order_by('cc_id', 'desc'); $committee = $this->db->get('tbl_commitee')->result_array(); return $committee; } public function add_committee($formArray) { # code... $this->db->insert('tbl_commitee', $formArray); } public function getSingleCom($id){ #code... $this->db->where('cc_id', $id); $com = $this->db->get('tbl_commitee')->result_array(); return $com; } public function deleteCom($id){ #code... $this->db->where('cc_id', $id); $this->db->delete('tbl_commitee'); } public function editCommittee($id, $formArray) { # code... $this->db->where('cc_id', $id); $this->db->update('tbl_commitee', $formArray); } // ==============Models for front-end start=============== // public function frontComm() { # code... $comm = $this->db->get('tbl_commitee')->result_array(); return $comm; } }