D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
public_html
/
ci_panel
/
application
/
models
/
Filename :
Prev_principal_model.php
back
Copy
<?php class Prev_principal_model extends CI_model{ public function get_prevp() { # code... $this->db->order_by('pp_id', 'desc'); $prevp = $this->db->get('tbl_pp')->result_array(); return $prevp; } public function add_pervp($formArray) { # code... $this->db->insert('tbl_pp', $formArray); } public function getPrevPri($id){ $this->db->where('pp_id', $id); $pp = $this->db->get('tbl_pp')->result_array(); return $pp; } public function deletePrevPri($id){ $this->db->where('pp_id', $id); $this->db->delete('tbl_pp'); } public function editPrevPrincipal($id, $formArray) { # code... $this->db->where('pp_id', $id); $this->db->update('tbl_pp', $formArray); } // ==============Models for front-end start=============== // public function ppFront() { # code... $this->db->order_by('pp_id', 'desc'); $pp = $this->db->get('tbl_pp')->result_array(); return $pp; } }