D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
public_html
/
ci_panel
/
application
/
models
/
Filename :
Committee_mem_model.php
back
Copy
<?php class Committee_mem_model extends CI_model{ public function get_committee_mem() { # code... $this->db->select ('*'); $this->db->join('tbl_commitee', 'tbl_commitee.cc_id=tbl_commitee_member.cc_id'); $this->db->join('tbl_department', 'tbl_department.dept_id=tbl_commitee_member.dept_id'); $this->db->order_by('mem_id', 'desc'); $committee = $this->db->get('tbl_commitee_member')->result_array(); return $committee; } public function add_committee_mem($formArray) { # code... $this->db->insert('tbl_commitee_member', $formArray); } public function getSingleComMem($id){ $this->db->where('mem_id', $id); $commem = $this->db->get('tbl_commitee_member')->result_array(); return $commem; } public function deleteComMem($id){ $this->db->where('mem_id', $id); $this->db->delete('tbl_commitee_member'); } public function updateComMem($id, $formArray) { # code... $this->db->where('mem_id', $id); $this->db->update('tbl_commitee_member', $formArray); } // ==============Models for front-end start=============== // public function frontCommMem($id) { # code... $this->db->where('mem_id', $id); $this->db->join('tbl_department', 'tbl_department.dept_id=tbl_commitee_member.dept_id'); $commem = $this->db->get('tbl_commitee_member')->result_array(); return $commem; } }