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.41.109
<?php
include ("database.php");
$appno = $_POST['appno'];
$user = $_SESSION['USERTYPE'];
$query = "SELECT DISTINCT studadm.FNAME as name, studadm.FFATNAME,ifnull(studadm.fregno,'') as fregno, '{$user}' as user,'{$appno}' as fappno,
studadm.FFAT_OCC, studadm.FCASTE, if(studadm.FSEX = 'M','Male','Female') as FSEX,
ifnull(studadm.FHANDICAP,'None') as FHANDICAP,studadm.FNATIONAL,
studadm.fpaymenttranid as FPAYMENTREMARKS,
studadm.fphotopath,studadm.fsignpath,studadm.fpaymentdate as FPAYMENTDATE,
ifnull(fapprstatus,'') as fapprstatus,
ifnull(fremarks,'') as fremarks,
date_format(studadm.FDOB,'%d/%m/%Y') as fdob,
studadm.FAADHARNO,
ifnull(studadm.FCURRADD1,'') as FCURRADD1,
ifnull(studadm.FCURRADD2,'') as FCURRADD2,
ifnull(studadm.FCURRADD3,'') as FCURRADD3,
ifnull(studadm.FCURDISTRICT,'') as FCURDISTRICT,
ifnull(studadm.FCURSTATE,'') as FCURSTATE,
ifnull(studadm.FCURPINCODE,'') as FCURPINCODE,
ifnull(studadm.FPERMADD1,'') as FPERMADD1,
ifnull(studadm.FPERMADD2,'') as FPERMADD2,
ifnull(studadm.FPERMADD3,'') as FPERMADD3,
ifnull(studadm.FPERDISTRICT,'') as FPERDISTRICT ,
ifnull(studadm.FPERSTATE,'') as FPERSTATE,
ifnull(studadm.FPERPINCODE,'') as FPERPINCODE,studadm.FCONTACT_NO,
studadm.FEMAIL,ifnull(studadm.FLANDLINE,' - ') as FLANDLINE,
studadm.FINCOME, studadm.FDEGREE, studadm.FENGLISH,
studadm.FCOMBCODE, studadm.FBASICQAL,studadm.FCENSTATE,
studadm.FCENDISTRICT, studadm.FCOLLCODE,
studadm.FPREVREGNO,studadm.FPREVCOMB, studadm.FPREVCOLLEGE,
studadm.FPREVELECTIVE, studadm.FPASSMTHYEAR,
GROUP_CONCAT(distinct subject.FSUBSHORT,'->',
subject.FSUBNAME ORDER BY subject.FSUBCODE
SEPARATOR '~') AS subjdet,studadm.FPAYMENTTYPE,studadm.FTOTFEE,
options.FEXAMNO,degree.fdescpn as fdegname,degree.fexamname as fexamname,
CONCAT(college.FCOLLNAME,', ',college.FTOWN) as FCOLLNAME
FROM studadm ,options,subject,college,degree,category
WHERE subject.FSUBCODE = options.FSUBCODE
AND subject.FDEGREE = options.FDEGREE
AND options.FDEGREE = degree.FDEGREE
AND subject.FDEGREE = degree.FDEGREE
and studadm.fexamno = degree.fexamno
AND college.FCOLLCODE = studadm.FCOLLCODE
AND college.FCOLLCODE = options.FCOLLCODE
AND options.FCOLLCODE=studadm.FCOLLCODE
AND studadm.FEXAMNO= options.FEXAMNO
AND studadm.FDEGREE = options.FDEGREE
AND studadm.FSLNO = options.FSLNO
AND category.fcategory = studadm.fcaste
AND options.FAPPNO = '{$appno}'
AND ifnull(studadm.fdeleted,'') <> 'T'
AND studadm.FAPPNO = '{$appno}'
GROUP BY options.FSLNO";
// var_dump($query);
$result = mysqli_query($conn,$query);
// var_dump($result);
//$results['fdegname'].' '.$results['fexamname']
$app = mysqli_fetch_array($result,MYSQLI_ASSOC);
echo json_encode($app);
?>
|