D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
public_html
/
ci_panel
/
application
/
models
/
Filename :
Acal_model.php
back
Copy
<?php class Acal_model extends CI_model{ public function get_acal() { # code... $this->db->order_by('acal_id', 'desc'); $acal = $this->db->get('tbl_acal')->result_array(); return $acal; } public function add_acal($formArray) { # code... $this->db->insert('tbl_acal', $formArray); } public function getSingleAcal($id) { # code... $this->db->where('acal_id', $id); $acal = $this->db->get('tbl_acal')->result_array(); return $acal; } public function deleteAcal($id) { # code... $this->db->where('acal_id', $id); $this->db->delete('tbl_acal'); } public function editAcal($id, $formArray) { # code... $this->db->where('acal_id', $id); $this->db->update('tbl_acal', $formArray); } // ==============Models for front-end start=============== // public function acal_front() { # code... $this->db->order_by('acal_id', 'desc'); $acal = $this->db->get('tbl_acal')->result_array(); return $acal; } }