course id changes in course master

This commit is contained in:
gandhimathi 2018-03-13 15:00:28 +05:30
parent 8e7a2fc259
commit f96ddbbe90

View File

@ -17,12 +17,12 @@ class Course_model extends CI_Model {
public function addCourse($arrayDetails=null,$jsonSemFeesData=null,$subjectDetails=null)
{
$this->db->select('CourseCode');
$this->db->where('CourseCode', $arrayDetails['CourseCode']);
$this->db->where('UniversityID', $arrayDetails['UniversityID']);
if($this->db->get(COURSE)->first_row()){
$result['courseStatus'] = false;
$result['message'] = "This course id is already exist!";
$result['message'] = "This course id is already exist in same university!";
} else {
$this->db->insert(COURSE, $arrayDetails);
if ($this->db->affected_rows() == '1') {