D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
public_html
/
ci_panel
/
application
/
models
/
Filename :
Slider_model.php
back
Copy
<?php class Slider_model extends CI_model{ public function getSlider() { # code... $slider = $this->db->get('tbl_slider')->result_array(); return $slider; } public function sliderCount() { # code... $slierCount = $this->db->count_all_results('tbl_slider'); return $slierCount; } public function addSlider($formArray) { # code... $this->db->insert('tbl_slider', $formArray); } public function getSlide($id) { # code... $this->db->where('slider_id', $id); $slide = $this->db->get('tbl_slider')->result_array(); return $slide; } public function deleteSlider($id) { # code... $this->db->where('slider_id', $id); $this->db->delete('tbl_slider'); } public function editSlider($id, $formArray) { # code... $this->db->where('slider_id', $id); $this->db->update('tbl_slider', $formArray); } // ==============Models for front-end start=============== // public function frontSlider() { # code... $this->db->order_by('slider_id', 'desc'); $slider_front = $this->db->get('tbl_slider')->result_array(); return $slider_front; } }