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 : 18.216.253.84
<?php
function saveSubQnWiseQns($aobj_context){
$data = json_decode($aobj_context->mobj_data["data"], true);
$params = json_decode($aobj_context->mobj_data["params"], true);
$qncode = $aobj_context->mobj_data["qncode"];
$qpcode = $params['qpcode'];
$year = $params['year'];
$mode = $params['mode'];
$teachcode = $params['teachcode'];
$set = $params['set'];
$tempcode = $params['tempcode'];
$type = $params['type'];
$query = "insert into mcqqpdet(fqpcode, fyear, fexamtype, fnoqp, fteachcode,
fqncode, fparent, fqpno, fmaxmarks, fquestion, fkeyans, ftype,
fmodquestion, fmodkeyans) values('{$qpcode}', '{$year}', '{$mode}',
'{$set}', '{$teachcode}', '{$data['fqncode']}', '{$qncode}', '{$data['fquestionno']}',
'{$data['fmaxmarks']}', '{$data['fquestion']}', '{$data['fkeyAns']}',
'{$data['ftype']}', '{$data['fquestion']}', '{$data['fkeyAns']}')";
// var_dump($query);die();
$res = $aobj_context->mobj_db->Execute($query);
if($res){
$arr['msg'] = 'saved successfully';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, 0, "success");
return;
}else{
$arr['msg'] = 'Failed to save';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, 0, "success");
return;
}
}
?>
|