D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
public_html
/
ci_panel
/
application
/
models
/
Filename :
Time_table_model.php
back
Copy
<?php class Time_table_model extends CI_model{ public function get_time_table() { # code... $this->db->order_by('t_id', 'desc'); $time_table = $this->db->get('time_table')->result_array(); return $time_table; } public function add_time_table($formArray) { # code... $this->db->insert('time_table', $formArray); } public function getSingleTimeTable($id){ $this->db->where('t_id', $id); $tt = $this->db->get('time_table')->result_array(); return $tt; } public function deleteTimeTable($id){ $this->db->where('t_id', $id); $this->db->delete('time_table'); } public function editTimeTable($id, $formArray) { # code... $this->db->where('t_id', $id); $this->db->update('time_table', $formArray); } // ==============Models for front-end start=============== // function ttFornt() { # code... $this->db->order_by('t_id', 'desc'); $tt = $this->db->get('time_table')->result_array(); return $tt; } }