course details changes done

This commit is contained in:
gandhimathi 2018-03-13 17:15:00 +05:30
parent 2cf1c6ec27
commit 87121e8e6c

View File

@ -22,7 +22,7 @@ class Course_model extends CI_Model {
$this->db->where('UniversityID', $arrayDetails['UniversityID']); $this->db->where('UniversityID', $arrayDetails['UniversityID']);
if($this->db->get(COURSE)->first_row()){ if($this->db->get(COURSE)->first_row()){
$result['courseStatus'] = false; $result['courseStatus'] = false;
$result['message'] = "This course id is already exist in same university!"; $result['message'] = "This course id is already exist in same university";
} else { } else {
$this->db->insert(COURSE, $arrayDetails); $this->db->insert(COURSE, $arrayDetails);
if ($this->db->affected_rows() == '1') { if ($this->db->affected_rows() == '1') {
@ -136,7 +136,7 @@ class Course_model extends CI_Model {
$this->db->where('CourseID !=', $arrayDetails['CourseID']); $this->db->where('CourseID !=', $arrayDetails['CourseID']);
if($this->db->get(COURSE)->first_row()){ if($this->db->get(COURSE)->first_row()){
$result['courseStatus'] = false; $result['courseStatus'] = false;
$result['message'] = "This course id is already exist!"; $result['message'] = "This course id is already exist in same university";
} }
else{ else{
$this->db->where('CourseID',$arrayDetails['CourseID']); $this->db->where('CourseID',$arrayDetails['CourseID']);