changes in course

This commit is contained in:
gandhimathi 2017-11-28 20:32:39 +05:30
parent 90732920e5
commit 21df4509bb

View File

@ -20,11 +20,11 @@ class Batch_model extends CI_Model {
$this->db->select('BatchCode'); $this->db->select('BatchCode');
$this->db->where('BatchCode', $arrayDetails['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['batchStatus'] = false;
$result['message'] = "This batch Code is already exist!"; $result['message'] = "This batch Code is already exist!";
} else { } else {
$this->db->insert(T_BATCHMASTER, $arrayDetails); $this->db->insert(BATCH, $arrayDetails);
if ($this->db->affected_rows() == '1') { if ($this->db->affected_rows() == '1') {
$result['batchStatus'] = true; $result['batchStatus'] = true;
@ -48,7 +48,7 @@ class Batch_model extends CI_Model {
public function getBatch() public function getBatch()
{ {
$this->db->select('CU.BatchCode,CU.BatchName,CU.IsActive,US.UniversityID,US.UniversityName'); $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->join(UNIVERSITY.' as US', 'US.UniversityID = CU.UniversityID');
$this->db->order_by('CU.CreatedOn','DESC'); $this->db->order_by('CU.CreatedOn','DESC');
$batchDetails = $this->db->get(); $batchDetails = $this->db->get();
@ -76,7 +76,7 @@ class Batch_model extends CI_Model {
public function updateBatch($arrayDetails=null) public function updateBatch($arrayDetails=null)
{ {
$this->db->where('BatchCode',$arrayDetails['BatchCode']); $this->db->where('BatchCode',$arrayDetails['BatchCode']);
$upateStatus=$this->db->update(T_BATCHMASTER, $arrayDetails); $upateStatus=$this->db->update(BATCH, $arrayDetails);
if($upateStatus){ if($upateStatus){
$result['batchStatus'] = true; $result['batchStatus'] = true;