diff --git a/Apollo/api/application/controllers/Student_Controller.php b/Apollo/api/application/controllers/Student_Controller.php index dfa60676..8d6198f0 100755 --- a/Apollo/api/application/controllers/Student_Controller.php +++ b/Apollo/api/application/controllers/Student_Controller.php @@ -496,11 +496,12 @@ class Student_Controller extends REST_Controller { $req['Comments'] = $data['Comments']; $req['DeactiveComments'] = $data['IsActive'] == 1 ? '': $data['DeactiveComments']; - $req['IsActive'] = $data['IsActive']; + $req['IsActive'] = $data['IsActive'] == 1 ? "1" : "0"; $req['UpdatedBy'] = $updatedBy; $date = date('Y-m-d H:i:s'); $req['UpdatedOn'] = $date; + $studentUpdate = $this->student_model->update_student( $req, $updateStudent, $imagename, $imageSource, $size );// Check if the employee exist if ($studentUpdate) { diff --git a/Apollo/api/application/models/Student_model.php b/Apollo/api/application/models/Student_model.php index 170694c1..50fdf76a 100755 --- a/Apollo/api/application/models/Student_model.php +++ b/Apollo/api/application/models/Student_model.php @@ -72,7 +72,7 @@ class Student_model extends CI_Model // list for super admin based on branch if ($getSearchData["University"] === '' && $getSearchData["Course"] === '' && $getSearchData["Status"] === '') { - $this->db->select('*'); + $this->db->select('t1.*'); $this->db->from('' . STUDENTS . ' as t1'); // $this->db->order_by('CreatedOn', 'DESC'); @@ -224,7 +224,7 @@ class Student_model extends CI_Model // print_r($getSearchData);exit(); - $this->db->select('*'); + $this->db->select('t1.*'); $this->db->from('' . STUDENTS . ' as t1'); // $this->db->where('BranchCode', $loginUserBranchId); @@ -1054,12 +1054,11 @@ class Student_model extends CI_Model public function update_student($empArr, $updateFor, $imagename, $imageSource, $size) { + // print_r($empArr);exit(); if ($imageSource == '') { - // print_r($empArr); // print_r($updateFor); // exit(); - $this->db->select('*'); $this->db->from(STUDENTS); $this->db->where('MobileNumber', $empArr['MobileNumber']);