D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
www
/
grievance
/
sys_admin
/
application
/
models
/
admin
/
Filename :
GrievanceManagement.php
back
Copy
<?php /** * Model Class For Handling All DB Operations Related To Grievances * * @author Softpro India Pvt. Ltd. */ defined('BASEPATH') OR exit('No direct script access allowed'); class GrievanceManagement extends CI_Model { function __construct() { parent::__construct(); $this->load->database(); } function getTotalPostedGrievances() { $this->db->select("count(*) totalPostedGrievances"); $this->db->from('grievance_mst GM'); return $this->db->get(); } function getAllGrievances() { $this->db->select("*"); $this->db->from('grievance_mst GM'); $this->db->join('grievance_cat_mst GCM', 'GM.gcm_id = GCM.gcm_id'); $this->db->join('college_admins_and_users CAU', 'GM.gm_submitted_by = CAU.cau_id'); $this->db->join('college_mst CM', 'CAU.clg_id = CM.clg_id'); $this->db->order_by('GM.gm_submitted_on desc'); return $this->db->get(); } function getGrievanceInfoById($gm_id) { $this->db->select("*"); $this->db->from('grievance_mst GM'); $this->db->join('grievance_cat_mst GCM', 'GM.gcm_id = GCM.gcm_id'); $this->db->join('college_admins_and_users CAU', 'GM.gm_submitted_by = CAU.cau_id'); $this->db->join('college_mst CM', 'CAU.clg_id = CM.clg_id'); $this->db->where('gm_id', $gm_id); return $this->db->get(); } }