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 : 52.14.176.111
<?php
function enableExamAppForm($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$univcode = $aobj_context->mobj_data["univcode"];
$req = $aobj_context->req_body;
$collto = $req['data']['collto'];
$collfrom = $req['data']['collfrom'];
$degfrom = $req['data']['degfrom'];
$degto = $req['data']['degto'];
$regnofrom = $req['data']['regnofrom'];
$regnoto = $req['data']['regnoto'];
$deggrp = $req['data']['deggrp'];
$status = $req['data']['status'];
// var_dump($deggrp);
// die();
$query = "update student set fappblock = '{$status}'
where fcollcode between '{$collfrom}' and '{$collto}'
and fdegree between '{$degfrom}' and '{$degto}'
and fregno between '{$regnofrom}' and '{$regnoto}'
and fdegree in(select fdegree from degree where fdeggrp = '{$deggrp}' and fexamno = 'A')";
$result=$aobj_context->pobj_db->Execute($query);
if($result){
$arr['msg'] = 'Updated Successfully...!';
echo $aobj_context->mobj_output->TOJSONEnvelope($arr,0,"success");
}
else{
$arr['msg']="Failed to update..!";
echo $aobj_context->mobj_output->TOJSONEnvelope($arr,-1,"failed");
}
}
|