student fees status changes

This commit is contained in:
gandhimathi 2018-04-24 15:17:26 +05:30
parent b9bae71513
commit c01f383357

View File

@ -1588,18 +1588,18 @@ class Fees_status_model extends CI_Model
* */
public function studentInfoForFeesStatus($studentID=null,$courseID=null){
// this sub query for avoid university duplicate id
$this->db->select('BranchID')->from(STUDENTCOURSE);
/* $this->db->select('BranchID')->from(STUDENTCOURSE);
$this->db->where('StudentID',$studentID);
$subQuery = $this->db->get_compiled_select();
$subQuery = $this->db->get_compiled_select();*/
// subquery end
$this->db->select('ST.Firstname,ST.MobileNumber,US.UniversityName,CU.CourseName,STC.BranchID');
$this->db->from(STUDENTCOURSE.' as STC');
$this->db->join(STUDENTS.' as ST', 'ST.StudentID = STC.StudentID');
$this->db->join(COURSE.' as CU', 'CU.CourseID = STC.CourseID');
$this->db->join(UNIVERSITY.' as US', 'US.UniversityID = STC.UniversityID');
$this->db->join(UNIVERSITY.' as US', 'US.UniversityID = STC.UniversityID AND STC.BranchID=US.BranchCode');
$this->db->where('ST.StudentID',$studentID);
$this->db->where('STC.CourseID',$courseID);
$this->db->where('US.BranchCode IN('. $subQuery.')', NULL, FALSE);
// $this->db->where('US.BranchCode IN('. $subQuery.')', NULL, FALSE);
$leadDet=$this->db->get()->last_row();
if($leadDet){
return $leadDet;