D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
public_html
/
ci_panel
/
application
/
models
/
Filename :
Ssr_model.php
back
Copy
<?php class Ssr_model extends CI_model{ public function get_ssr() { # code... $this->db->order_by('ssr_id', 'desc'); $ssr = $this->db->get('ssr')->result_array(); return $ssr; } public function add_ssr($formData) { # code... $this->db->insert('ssr', $formData); } public function getSingleSsr($id) { # code... $this->db->where('ssr_id', $id); $ssr = $this->db->get('ssr')->result_array(); return $ssr; } public function deleteSsr($id) { # code... $this->db->where('ssr_id', $id); $this->db->delete('ssr'); } public function editSsr($id, $formData) { # code... $this->db->where('ssr_id', $id); $this->db->update('ssr', $formData); } // ==============Models for front-end start=============== // public function ssrFront() { # code... $this->db->order_by('ssr_id', 'desc'); $ssr = $this->db->get('ssr')->result_array(); return $ssr; } } ?>