diff --git a/Apollo/api/application/models/Subject_model.php b/Apollo/api/application/models/Subject_model.php index 37f3d269..06f5bffa 100644 --- a/Apollo/api/application/models/Subject_model.php +++ b/Apollo/api/application/models/Subject_model.php @@ -15,12 +15,12 @@ class Subject_model extends CI_Model $this->db->select('SubjectCode'); $this->db->where('SubjectCode',$arrayDetails['SubjectCode']); - if($this->db->get('T_SubjectMaster')->first_row()){ + if($this->db->get(SUBJECTMASTER)->first_row()){ $result['SubjectStatus']=false; $result['message']="This subject code already exists"; }else{ - $this->db->insert('T_SubjectMaster',$arrayDetails); + $this->db->insert(SUBJECTMASTER,$arrayDetails); if ($this->db->affected_rows() == '1') { $result['SubjectStatus']=true; @@ -45,12 +45,12 @@ public function updateSubject($arrayDetails=null,$SubjectID=null) $this->db->select('SubjectCode'); $this->db->where('SubjectCode',$arrayDetails['SubjectCode']); $this->db->where('SubjectCode !=', $arrayDetails['SubjectCode']); - if($this->db->get('T_SubjectMaster')->first_row()){ + if($this->db->get(SUBJECTMASTER)->first_row()){ $result['SubjectStatus']=false; $result['message']="This subject code is already exists"; }else{ $this->db->where('SubjectID',$SubjectID); - $upateStatus=$this->db->update('T_SubjectMaster', $arrayDetails); + $upateStatus=$this->db->update(SUBJECTMASTER, $arrayDetails); @@ -82,7 +82,7 @@ public function updateSubject($arrayDetails=null,$SubjectID=null) { $this->db->select('*'); $this->db->order_by('CreatedOn','DESC'); - $subjectDetails = $this->db->get('T_SubjectMaster'); + $subjectDetails = $this->db->get(SUBJECTMASTER); if($subjectDetails->result()){