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.141.25.125
<?php
function loadfreshexam($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$query= "SELECT fdeggrp,fdescpn FROM deggrp";
$lobj_get_data = $aobj_context->mobj_db->GetAll($query);
if($lobj_get_data)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_data,0,"success");
return;
}
else
{
$data = "No data found..!";
echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure");
return;
}
}
function saveFreshExam($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degree=$aobj_context->mobj_data["degree"];
$from=$aobj_context->mobj_data["from"];
$to=$aobj_context->mobj_data["to"];
$fexam=$aobj_context->mobj_data["fexam"];
$query="UPDATE candsum SET FFRESHEXAM = '$fexam'
WHERE fregno BETWEEN '$from' AND '$to'
AND fdegree IN(SELECT fdegree FROM degree WHERE fdeggrp = '$degree'
AND fexamno = 'A')";
$lobj_get_data = $aobj_context->mobj_db->Execute($query);
if($lobj_get_data)
{
$arr['msg']="Success";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
else
{
$arr['msg'] = "Fail to update";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
return;
}
}
?>
|