diff --git a/Apollo/api/application/models/Student_model.php b/Apollo/api/application/models/Student_model.php index 540b19de..5f46e905 100755 --- a/Apollo/api/application/models/Student_model.php +++ b/Apollo/api/application/models/Student_model.php @@ -1014,6 +1014,7 @@ $this->db->select('*'); $this->db->from('T_Student_CourseDetails'); $this->db->where('EnrollmentID',$EnrollmentID); $this->db->where('UniversityID',$Arr['UniversityID']); +$this->db->where('IsActive','1'); $qry=$this->db->get(); $qry=$qry->result(); @@ -1045,6 +1046,7 @@ if(count($qry)>0) $this->db->from(STUDENTCOURSE); $this->db->where('StudentID', $studID); $this->db->where('CourseID', $Arr['CourseID']); + $this->db->where('IsActive','1'); if ($this->db->get()->first_row()) { $result['addStuCourseStatus'] = false; $result['message'] = "This Student Already exist for this course"; @@ -1577,6 +1579,7 @@ if(count($qry)>0) $qry=$this->db->get(); $qry=$qry->result(); + //print_r($this->db->last_query());die(); if(count($qry)>0) { @@ -1596,12 +1599,13 @@ if(count($qry)>0) $this->db->from('T_Student_CourseDetails'); $this->db->where('EnrollmentID',$Enrollment); $this->db->where('UniversityID',$universityid); - // $this->db->where_not_in('StudentID', $reqArr['StudentID']); + $this->db->where('IsActive','1'); + $this->db->where_not_in('StudentID', $reqArr['StudentID']); // $this->db->where_not_in('CourseID', $reqArr['CourseID']); $qry=$this->db->get(); $qry=$qry->result(); - // print_r($this->db->last_query());die(); + //print_r($this->db->last_query());die(); //echo count($qry);die();