dashboard changes
This commit is contained in:
parent
1aa7d58683
commit
5f81769c1e
@ -74,7 +74,37 @@ class Dashboard_model extends CI_Model
|
|||||||
* created by kms
|
* created by kms
|
||||||
* */
|
* */
|
||||||
public function get_univ_registered_student($details){
|
public function get_univ_registered_student($details){
|
||||||
|
$this->db->distinct();
|
||||||
|
$this->db->select('UniversityID,UniversityName');
|
||||||
|
$this->db->from(UNIVERSITY);
|
||||||
|
$this->db->order_by('ID','DESC');
|
||||||
|
$this->db->where('BranchCode',$details['localBranchID']);
|
||||||
|
$getUnivDetails = $this->db->get();
|
||||||
|
if($getUnivDetails->result()){
|
||||||
|
$resultDetails['resultStatus']=true;
|
||||||
|
foreach ($getUnivDetails->result() as $rows){
|
||||||
|
$fetchDetails['UniversityID']=$rows->UniversityID;
|
||||||
|
$fetchDetails['UniversityName']=$rows->UniversityName;
|
||||||
|
$this->db->select('StudentID');
|
||||||
|
$this->db->from(STUDENTCOURSE);
|
||||||
|
$this->db->where('BranchID',$details['localBranchID']);
|
||||||
|
$this->db->where('UniversityID',$rows->UniversityID);
|
||||||
|
$getRegisterDetails = $this->db->get();
|
||||||
|
if($getRegisterDetails->num_rows()>0){
|
||||||
|
$fetchDetails['StudentCounts']=$getRegisterDetails->num_rows();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$fetchDetails['StudentCounts']=0;
|
||||||
|
}
|
||||||
|
$getArray[]=$fetchDetails;
|
||||||
|
}
|
||||||
|
$resultDetails['details']=$getArray;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$resultDetails['resultStatus']=false;
|
||||||
|
$resultDetails['Message']="No records found!";
|
||||||
|
}
|
||||||
|
return $resultDetails;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user