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.147.45.159
<?php
function getPGetStudDet($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$query="select fappno,fname,date_format(fcreatedate,'%d/%m/%y') as fcreatedate,
fcategory,ifnull(fappremarks,'') as fappremarks,fqmaxmarks,fqsecmarks,
round(if(fqpercentage is null or fqpercentage = '', ((fqsecmarks*100)/fqmaxmarks), fqpercentage),2) as fqpercentage
from pgstudadm
where fmobileno='{$_SESSION['MOBILE']}'";
$result= $aobj_context->mobj_db->GetRow($query);
// var_dump($query,$result);
if(!$result && gettype($result) == 'boolean'){
$arr['msg'] = "Error while fetching data";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
if(count($result) > 0) {
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success");
return;
}
else {
$arr['msg'] = "No data found";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
}
?>
|