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.15.211.55
<?php
function getCombinationSubjects($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degree = $aobj_context->mobj_data["deg"];
$query = "select distinct fsubcode, fsubname from subject
where fdegree = '{$degree}' and ifnull(fcombsub,'') = 'T'";
// var_dump($query);
$result = $aobj_context->pobj_db->GetAll($query);
// var_dump($query);
if(count($result) > 0)
{
$res['combsubs'] = $result;
echo $aobj_context->mobj_output->ToJSONEnvelope($res,0,"success");
return;
}
else
{
$arr['msg'] = 'Subject not Found';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
return;
}
}
|