diff --git a/Apollo/api/application/models/Batch_model.php b/Apollo/api/application/models/Batch_model.php index e827cad0..ce2fefad 100644 --- a/Apollo/api/application/models/Batch_model.php +++ b/Apollo/api/application/models/Batch_model.php @@ -20,11 +20,11 @@ class Batch_model extends CI_Model { $this->db->select('BatchCode'); $this->db->where('BatchCode', $arrayDetails['BatchCode']); - if($this->db->get(T_BATCHMASTER)->first_row()){ + if($this->db->get(BATCH)->first_row()){ $result['batchStatus'] = false; $result['message'] = "This batch Code is already exist!"; } else { - $this->db->insert(T_BATCHMASTER, $arrayDetails); + $this->db->insert(BATCH, $arrayDetails); if ($this->db->affected_rows() == '1') { $result['batchStatus'] = true; @@ -48,7 +48,7 @@ class Batch_model extends CI_Model { public function getBatch() { $this->db->select('CU.BatchCode,CU.BatchName,CU.IsActive,US.UniversityID,US.UniversityName'); - $this->db->from(T_BATCHMASTER.' as CU'); + $this->db->from(BATCH.' as CU'); $this->db->join(UNIVERSITY.' as US', 'US.UniversityID = CU.UniversityID'); $this->db->order_by('CU.CreatedOn','DESC'); $batchDetails = $this->db->get(); @@ -76,7 +76,7 @@ class Batch_model extends CI_Model { public function updateBatch($arrayDetails=null) { $this->db->where('BatchCode',$arrayDetails['BatchCode']); - $upateStatus=$this->db->update(T_BATCHMASTER, $arrayDetails); + $upateStatus=$this->db->update(BATCH, $arrayDetails); if($upateStatus){ $result['batchStatus'] = true;