Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.21.93.159
<?php
function getExmStatsSumm($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$univcode = $aobj_context->mobj_data['univcode'];
$fcollcode = $aobj_context->mobj_data['fcollcode'];
$fdeggrp = $aobj_context->mobj_data['fdeggrp'];
// var_dump('csdss',$fdeggrp);
// die();
$fcollcode != '' ? $colQry = "and c.fcollcode='{$fcollcode}' " : $colQry="";
$query="select 'Total Students', count(*) as studTtl from candsum c inner join degree d on d.fdegree = c.fdegree
and d.fexamno = c.fexamno
where fdeggrp = '{$fdeggrp}' {$colQry}
union
select 'Success', count(*) as studSucc from candsum c inner join degree d on d.fdegree = c.fdegree
and d.fexamno = c.fexamno
where fdeggrp = '{$fdeggrp}' and ifnull(frecptdate,'')<>'' {$colQry}
union
select 'Pending', count(*) as studPend from candsum c inner join degree d on d.fdegree = c.fdegree
and d.fexamno = c.fexamno
where fdeggrp = '{$fdeggrp}' and ifnull(frecptdate,'')='' {$colQry}";
$result = $aobj_context->pobj_db->getAll($query);
$qry1 = "select lcase(ac.fpaygateway) as fpaygateway,count(distinct ac.fregno) as count from
(select c.fregno,if( fpaymentype = 'Other Banks', ifnull(fpaygateway,''), fpaymentype ) as fpaygateway
from appcandsum c inner join degree d on d.fdegree = c.fdegree
and d.fexamno = c.fexamno
where fdeggrp = '{$fdeggrp}' and fpaymentstatus='success' {$colQry}
group by c.fregno) ac
group by ac.fpaygateway
order by ac.fpaygateway desc";
$result3 = $aobj_context->pobj_db->getAll($qry1);
// var_dump($result1,$result2);
// die();
if($result && $result != boolean){
$res['det'] = $result;
$res['PayDet1'] = $result3;
echo $aobj_context->mobj_output->ToJSONEnvelope($res,0,"success");
}else{
$arr = 'Data not Found';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
}
?>
|