D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
public_html
/
grievance
/
application
/
models
/
Filename :
GCAllotManagement.php
back
Copy
<?php /** * Model Class for Handling All DB Operations Related To Grievance Category Allotment * * @author Softpro India Pvt. Ltd. */ defined('BASEPATH') OR exit('No direct script access allowed'); class GCAllotManagement extends CI_Model { function __construct() { parent::__construct(); $this->load->database(); } function makeNewAllotment(array $newAllotmentInfo) { $this->db->insert('gcell_member_allot', $newAllotmentInfo); return $this->db->insert_id(); } function getAllottedGCToUser($cau_id){ $this->db->select("*"); $this->db->from('gcell_member_allot'); $this->db->where('cau_id', $cau_id); return $this->db->get(); } function deleteGCAllotMappingByUserId($cau_id) { $this->db->where('cau_id', $cau_id); $this->db->delete('gcell_member_allot'); } function getAllottedGCToUserFullInfo($cau_id){ $this->db->select("*"); $this->db->from('gcell_member_allot GMA'); $this->db->join('grievance_cat_mst GCM','GMA.gcm_id = GCM.gcm_id'); $this->db->where('GMA.cau_id', $cau_id); return $this->db->get(); } }