From 716ac3b3f1901ef0a86bd838efa9c5a6e094832b Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Tue, 24 Apr 2018 18:43:17 +0530 Subject: [PATCH] student view changes --- Apollo/api/application/models/Studentview_model.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Apollo/api/application/models/Studentview_model.php b/Apollo/api/application/models/Studentview_model.php index 08bfef9a..bae4d182 100755 --- a/Apollo/api/application/models/Studentview_model.php +++ b/Apollo/api/application/models/Studentview_model.php @@ -39,7 +39,9 @@ class Studentview_model extends CI_Model $this->db->select('ST.*'); $this->db->from( LOGIN . ' as LO'); $this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID'); + $this->db->join( STUDENTCOURSE . ' as STC', 'STC.StudentID = ST.StudentID'); $this->db->where('ST.StudentID', $requestedBy); + $this->db->where('STC.BranchID', $requestedBranch); $studentDetails = $this->db->get()->first_row(); if($studentDetails){ $result['studentStatus'] = true; @@ -56,7 +58,9 @@ class Studentview_model extends CI_Model $this->db->select('ST.*'); $this->db->from( LOGIN . ' as LO'); $this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID'); + $this->db->join( STUDENTCOURSE . ' as STC', 'STC.StudentID = ST.StudentID'); $this->db->where('ST.MobileNumber', $requestedBy); + $this->db->where('STC.BranchID', $requestedBranch); $studentDetails = $this->db->get()->first_row(); if($studentDetails){ $result['studentStatus'] = true;