D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
public_html
/
ci_panel
/
application
/
models
/
Filename :
Aqar_model.php
back
Copy
<?php class Aqar_model extends CI_model{ public function get_aqar() { # code... $this->db->order_by('aqar_id', 'desc'); $aqar = $this->db->get('aqar')->result_array(); return $aqar; } public function create_aqar($formData) { # code... $this->db->insert('aqar', $formData); } public function getSingleAqar($id) { # code... $this->db->where('aqar_id', $id); $aqar = $this->db->get('aqar')->result_array(); return $aqar; } public function deleteAqar($id) { # code... $this->db->where('aqar_id', $id); $this->db->delete('aqar'); } public function editAqar($id, $formArray) { # code... $this->db->where('aqar_id', $id); $this->db->update('aqar', $formArray); } // ==============Models for front-end start=============== // public function aqarFront() { # code... $this->db->order_by('aqar_id', 'desc'); $aqar = $this->db->get('aqar')->result_array(); return $aqar; } }