Viewing file: service.php (18.92 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include("mua_controller.php");
class Service extends Mua_Controller {
function Service() {
parent::__construct();
//header('Content-Type: application/json');
//$this->load->database();
$this->load->database('mua',TRUE);
}
function fetchStdAdy(){
$stdAdY = $this->db->query('SELECT regist.`rg_StudentSummary`.`ssmAcY`
FROM regist.`rg_Student`
inner join regist.`rg_StudentSummary` on regist.rg_StudentSummary.ssmStdId = regist.`rg_Student`.stdId
WHERE regist.`rg_Student`.`stdSstId`
IN ( 1, 2, 3 )
GROUP BY regist.`rg_Student`.`stdAdY`
ORDER BY regist.`rg_Student`.`stdAdY` DESC');
echo json_encode($stdAdY->result());
}
function fetchTmId(){
if(isset($_GET['stdAdY'])){
$stdAdY = $_GET['stdAdY'];
}else{
$stdAdY = false;
}
$ssmTmId = $this->db->query('SELECT regist.`rg_StudentSummary`.`ssmTmId`
FROM regist.`rg_StudentSummary`
inner join regist.`rg_Student` on regist.rg_StudentSummary.ssmStdId = regist.`rg_Student`.stdId
WHERE regist.`rg_StudentSummary`.`ssmAcY` = '.$stdAdY.'
and regist.`rg_Student`.`stdSstId` IN ( 1, 2, 3 )
GROUP BY regist.`rg_StudentSummary`.`ssmTmId`
ORDER BY regist.`rg_StudentSummary`.`ssmTmId`');
echo json_encode($ssmTmId->result());
}
/*function SyncStudent(){
if(isset($_POST['sync'])){
$sync = $_POST['sync'];
}else{
$sync = false;
}
$insertUocStd = 0; $updatetUocStd = 0;
if($sync){
$stds = $this->db->query('SELECT *
FROM regist.`rg_Student`
INNER JOIN regist.rg_StudentDetails ON regist.rg_StudentDetails.sdtStdId = regist.`rg_Student`.stdId
INNER JOIN regist.rg_Prefix ON regist.rg_Prefix.pfId = regist.`rg_Student`.stdPfId
INNER JOIN mua.ref_perfix ON TRIM( mua.ref_perfix.ref_perfix_name ) = regist.`rg_Prefix`.pfName
INNER JOIN regist.rg_Province ON regist.rg_Province.prvId = regist.rg_StudentDetails.sdtPrvIdHome
INNER JOIN peoplecenter.Nation ON peoplecenter.Nation.nationId = regist.rg_StudentDetails.sdtNtId');
$qref_univ = $this->db->query('SELECT `ref_univ`.`UNIV_ID`
FROM mua.`ref_univ` INNER JOIN regist.rg_Config AS config ON config.cfgClgName = mua.ref_univ.`UNIV_NAME_TH` ');
$ref_univ = $qref_univ->result();
foreach($stds->result() as $std){
$qcount_mua = $this->db->query('SELECT count(*) as count from uoc_std where STD_ID ='.$std->stdCode);
$count_mua = $qcount_mua->result();
$BIRTHDAY = explode("-",$std->sdtBirthDate);
$prvName = $std->prvName != null ? $std->prvName:'---';
$nationName = $std->nationName != null ? $std->nationName:'---';
$qref_province = $this->db->query('SELECT * FROM `ref_province` where PROVINCE_NAME_TH like'.'"%'.$prvName.'%"');
$ref_province = $qref_province->result();
$qref_nation = $this->db->query('SELECT * FROM `ref_nation` where NATION_NAME_TH like'.'"%'.$nationName.'%"');
$ref_nation = $qref_nation->result();
if($std->stdSstId == 1 || $std->stdSstId == 3){
$STD_STATUS = 1;
}else{
$STD_STATUS = 2;
}
$qgpa = $this->db->query('SELECT rgsm.ssmTmId , rgsm.ssmAcY , rgsm.`ssmGPA` ,rgsm.`ssmGPAX` , rgsm.ssmCreditAttempt , rgsm.ssmCreditSatisfy
FROM regist.`rg_StudentSummary` AS rgsm
WHERE rgsm.`ssmStdId` = "'.$std->stdId.'"
AND rgsm.`ssmAcY` = ( SELECT MAX(`ssmAcY`) FROM regist.`rg_StudentSummary`
WHERE regist.`rg_StudentSummary`.`ssmStdId` = rgsm.`ssmStdId` )
AND rgsm.`ssmTmId` = ( SELECT MAX(`ssmTmId`) FROM regist.`rg_StudentSummary` WHERE regist.`rg_StudentSummary`.`ssmStdId` = rgsm.`ssmStdId` AND regist.`rg_StudentSummary`.`ssmAcY` = rgsm.ssmAcY)');
$gpa = $qgpa->result();
$data = array(
'YEAR' => $gpa[0]->ssmAcY,
'SEMESTER' => $gpa[0]->ssmTmId,
'UNIV_ID'=>$ref_univ[0]->UNIV_ID,
'STD_ID ' => $std->stdCode ? $std->stdCode:'',
'CITIZEN_ID' =>$std->sdtCitizenId,
'PREFIX_NAME_ID' =>$std->ref_perfix_id,
'STD_FNAME' =>$std->stdName,
'STD_LNAME' =>$std->stdSurname,
'STD_FNAME_EN' => $std->stdNameE,
'STD_LNAME_EN' => $std->stdSurnameE,
'GENDER_ID' => $std->sdtSex == 'M' ? 1:2,
'BIRTHDAY' => ($BIRTHDAY[0] + 543).'-'.$BIRTHDAY[1].'-'.$BIRTHDAY[2],
'PROVINCE_ID' => $qref_province->num_rows() > 0 ? $ref_province[0]->PROVINCE_ID:'',
'NATION_ID' => $qref_nation->num_rows() > 0 ? $ref_nation[0]->NATION_ID:'',
'COUNTRY_ID'=> $qref_nation->num_rows() > 0 ? $ref_nation[0]->NATION_ID:'',
'ADMIT_YEAR'=> $std->stdAdY,
'STUDY_TYPE_ID'=> 1,
'STUDY_TIME_ID'=> 1,
'CURR_REG_ID'=> 1,
'CLASS'=> $std->stdSyId,
'GRAD_STATUS_ID' => 1,
'STD_STATUS_ID ' => $STD_STATUS,
'GPA' => $gpa[0]->ssmGPA,
'GPAX'=> $gpa[0]->ssmGPAX,
'NUM_CREDIT' => $gpa[0]->ssmCreditAttempt,
'ACC_CREDIT' => $gpa[0]->ssmCreditSatisfy,
'FAT_STATUS_ID' => $std->sdtFatherStatus <= 2 ? 1:0,
'FAT_REVENUE_ID' => 0,
'FAT_OCCUP_ID' => 07,
'MOT_STATUS_ID' => $std->sdtMotherStatus <= 2 ? 1:0,
'MOT_REVENUE_ID' => 0,
'MOT_OCCUP_ID' => 07,
);
if($count_mua[0]->count >= 1){
$this->db->where('STD_ID', $std->stdCode ? $std->stdCode:'');
$this->db->update('uoc_std', $data);
$this->db->trans_commit();
$updatetUocStd++;
}else{
$this->db->insert('uoc_std', $data);
$this->db->trans_commit();
$insertUocStd++;
}
}
}
//$this->contents['New'] = $insertUocStd;
//$this->contents['Update'] = $updatetUocStd;
//$this->contents['sync'] = $sync;
//$this->output($this->config->item("rg_folder")."v_SyncStudent",true);
$data['New'] = $insertUocStd;
$data['Update'] = $updatetUocStd;
$data['sync'] = $sync;
$this->load->view('eregis/v_SyncStudent',$data);
} */
function fromStudy(){
$this->load->view('eregis/v_SyncStudent');
}
function fromGraduate(){
$this->load->view('eregis/v_SyncGraduate');
}
function syncStudy(){
$setstdAdY = isset($_POST['setstdAdY']) ? $_POST['setstdAdY']:'';
$setssmTmId = isset($_POST['setssmTmId']) ? $_POST['setssmTmId']:'';
$stds = $this->db->query('SELECT *
FROM regist.`rg_Student`
INNER JOIN regist.rg_StudentDetails ON regist.rg_StudentDetails.sdtStdId = regist.`rg_Student`.stdId
INNER JOIN regist.rg_StudentSummary ON regist.rg_StudentSummary.ssmStdId = regist.`rg_Student`.stdId
left JOIN regist.rg_Prefix ON regist.rg_Prefix.pfId = regist.`rg_Student`.stdPfId
left JOIN mua.ref_perfix ON TRIM( mua.ref_perfix.ref_perfix_name ) = regist.`rg_Prefix`.pfName
left JOIN regist.rg_Province ON regist.rg_Province.prvId = regist.rg_StudentDetails.sdtPrvIdWork
left JOIN peoplecenter.Nation ON peoplecenter.Nation.nationId = regist.rg_StudentDetails.sdtNtId
INNER JOIN regist.rg_Curriculum ON regist.rg_Curriculum.curId = regist.`rg_Student`.stdCurId
WHERE regist.`rg_Student`.stdSstId != 4
AND regist.rg_StudentSummary.ssmAcY = '.$setstdAdY .'
AND regist.rg_StudentSummary.ssmTmId ='.$setssmTmId);
$qref_univ = $this->db->query('SELECT `ref_univ`.`UNIV_ID`
FROM mua.`ref_univ` INNER JOIN regist.rg_Config AS config ON config.cfgClgName = mua.ref_univ.`UNIV_NAME_TH` ');
$ref_univ = $qref_univ->result();
foreach($stds->result() as $std){
$qcount_mua = $this->db->query('SELECT count(*) as count from uoc_std where STD_ID ='.$std->stdCode);
$count_mua = $qcount_mua->result();
$BIRTHDAY = explode("-",$std->sdtBirthDate);
$prvName = $std->prvName != null ? $std->prvName:'---';
$nationName = $std->nationName != null ? $std->nationName:'---';
$qref_province = $this->db->query('SELECT * FROM `ref_province` where PROVINCE_NAME_TH like'.'"%'.$prvName.'%"');
$ref_province = $qref_province->result();
$qref_nation = $this->db->query('SELECT * FROM `ref_nation` where NATION_NAME_TH like'.'"%'.$nationName.'%"');
$ref_nation = $qref_nation->result();
if($std->stdSstId == 1 || $std->stdSstId == 3){
$STD_STATUS = 1;
$GRAD_STATUS_ID = 1;
}else if($std->stdSstId == 2){
$STD_STATUS = 2;
$GRAD_STATUS_ID = 1;
}else if($std->stdSstId >=5){
$STD_STATUS = 4;
$GRAD_STATUS_ID = 0;
}
$data = array(
'YEAR' => $std->ssmAcY,
'SEMESTER' => $std->ssmTmId,
'UNIV_ID'=>$ref_univ[0]->UNIV_ID,
'STD_ID ' => $std->stdCode ? $std->stdCode:'',
'CITIZEN_ID' =>$std->sdtCitizenId,
'PREFIX_NAME_ID' =>$std->ref_perfix_id,
'STD_FNAME' =>$std->stdName,
'STD_LNAME' =>$std->stdSurname,
'STD_FNAME_EN' => $std->stdNameE,
'STD_LNAME_EN' => $std->stdSurnameE,
'GENDER_ID' => $std->sdtSex == 'M' ? 1:2,
'BIRTHDAY' => ($BIRTHDAY[0] + 543).'-'.$BIRTHDAY[1].'-'.$BIRTHDAY[2],
'PROVINCE_ID' => $qref_province->num_rows() > 0 ? $ref_province[0]->PROVINCE_ID:'',
'NATION_ID' => $qref_nation->num_rows() > 0 ? $ref_nation[0]->NATION_ID:'',
'COUNTRY_ID'=> $qref_nation->num_rows() > 0 ? $ref_nation[0]->NATION_ID:'',
'ADMIT_YEAR'=> $std->stdAdY,
'STUDY_TYPE_ID'=> 1,
'STUDY_TIME_ID'=> 1,
'CURR_REG_ID'=> 1,
'CLASS'=> $std->stdSyId,
'GRAD_STATUS_ID' => $GRAD_STATUS_ID,
'STD_STATUS_ID ' => $STD_STATUS,
'GPA' => $std->ssmGPA,
'GPAX'=> $std->ssmGPAX,
'NUM_CREDIT' => $std->ssmCreditAttempt,
'ACC_CREDIT' => $std->ssmCreditSatisfy,
'FAT_STATUS_ID' => $std->sdtFatherStatus <= 2 ? 1:0,
'FAT_REVENUE_ID' => 0,
'FAT_OCCUP_ID' => 07,
'MOT_STATUS_ID' => $std->sdtMotherStatus <= 2 ? 1:0,
'MOT_REVENUE_ID' => 0,
'MOT_OCCUP_ID' => 07,
'PASSPORT_STATUS' => 0,
'CURR_ID' => $std->curName
);
if($count_mua[0]->count >= 1){
$this->db->where('STD_ID', $std->stdCode ? $std->stdCode:'');
$this->db->update('uoc_std', $data);
$this->db->trans_commit();
}else{
$this->db->insert('uoc_std', $data);
$this->db->trans_commit();
}
}
$this->output->set_header("HTTP/1.1 200 OK");
$message['status'] = 'completed';
echo json_encode($message);
}
function syncGraduate(){
$setstdAdY = isset($_POST['setstdAdY']) ? $_POST['setstdAdY']:'';
//$setssmTmId = isset($_POST['setssmTmId']) ? $_POST['setssmTmId']:'';
$stds = $this->db->query('SELECT *
FROM regist.`rg_Student`
INNER JOIN regist.rg_StudentDetails ON regist.rg_StudentDetails.sdtStdId = regist.`rg_Student`.stdId
INNER JOIN regist.rg_StudentSummary ON regist.rg_StudentSummary.ssmStdId = regist.`rg_Student`.stdId
left JOIN regist.rg_Prefix ON regist.rg_Prefix.pfId = regist.`rg_Student`.stdPfId
left JOIN mua.ref_perfix ON TRIM( mua.ref_perfix.ref_perfix_name ) = regist.`rg_Prefix`.pfName
left JOIN regist.rg_Province ON regist.rg_Province.prvId = regist.rg_StudentDetails.sdtPrvIdWork
left JOIN peoplecenter.Nation ON peoplecenter.Nation.nationId = regist.rg_StudentDetails.sdtNtId
INNER JOIN regist.rg_Curriculum ON regist.rg_Curriculum.curId = regist.`rg_Student`.stdCurId
WHERE regist.`rg_Student`.`stdSstId` = 4
AND regist.rg_Student.stdGraduateY = '.$setstdAdY);
$qref_univ = $this->db->query('SELECT `ref_univ`.`UNIV_ID`
FROM mua.`ref_univ` INNER JOIN regist.rg_Config AS config ON config.cfgClgName = mua.ref_univ.`UNIV_NAME_TH` ');
$ref_univ = $qref_univ->result();
foreach($stds->result() as $std){
$qcount_mua = $this->db->query('SELECT count(*) as count from uoc_std where STD_ID ='.$std->stdCode);
$count_mua = $qcount_mua->result();
$BIRTHDAY = explode("-",$std->sdtBirthDate);
$prvName = $std->prvName != null ? $std->prvName:'---';
$nationName = $std->nationName != null ? $std->nationName:'---';
$qref_province = $this->db->query('SELECT * FROM `ref_province` where PROVINCE_NAME_TH like'.'"%'.$prvName.'%"');
$ref_province = $qref_province->result();
$qref_nation = $this->db->query('SELECT * FROM `ref_nation` where NATION_NAME_TH like'.'"%'.$nationName.'%"');
$ref_nation = $qref_nation->result();
$STD_STATUS = 1;
$GRAD_STATUS_ID = 1;
$data = array(
'YEAR' => $std->ssmAcY,
'SEMESTER' => $std->ssmTmId,
'UNIV_ID'=>$ref_univ[0]->UNIV_ID,
'STD_ID ' => $std->stdCode ? $std->stdCode:'',
'CITIZEN_ID' =>$std->sdtCitizenId,
'PREFIX_NAME_ID' =>$std->ref_perfix_id,
'STD_FNAME' =>$std->stdName,
'STD_LNAME' =>$std->stdSurname,
'STD_FNAME_EN' => $std->stdNameE,
'STD_LNAME_EN' => $std->stdSurnameE,
'GENDER_ID' => $std->sdtSex == 'M' ? 1:2,
'BIRTHDAY' => ($BIRTHDAY[0] + 543).'-'.$BIRTHDAY[1].'-'.$BIRTHDAY[2],
'PROVINCE_ID' => $qref_province->num_rows() > 0 ? $ref_province[0]->PROVINCE_ID:'',
'NATION_ID' => $qref_nation->num_rows() > 0 ? $ref_nation[0]->NATION_ID:'',
'COUNTRY_ID'=> $qref_nation->num_rows() > 0 ? $ref_nation[0]->NATION_ID:'',
'ADMIT_YEAR'=> $std->stdAdY,
'STUDY_TYPE_ID'=> 1,
'STUDY_TIME_ID'=> 1,
'CURR_REG_ID'=> 1,
'CLASS'=> $std->stdSyId,
'GRAD_STATUS_ID' => $GRAD_STATUS_ID,
'STD_STATUS_ID ' => $STD_STATUS,
'GPA' => $std->stdGPA,
'GPAX'=> $std->ssmGPAX,
'NUM_CREDIT' => $std->ssmCreditAttempt,
'ACC_CREDIT' => $std->ssmCreditSatisfy,
'FAT_STATUS_ID' => $std->sdtFatherStatus <= 2 ? 1:0,
'FAT_REVENUE_ID' => 0,
'FAT_OCCUP_ID' => 07,
'MOT_STATUS_ID' => $std->sdtMotherStatus <= 2 ? 1:0,
'MOT_REVENUE_ID' => 0,
'MOT_OCCUP_ID' => 07,
'PASSPORT_STATUS' => 0,
'CURR_ID' => $std->curName
);
if($count_mua[0]->count >= 1){
$this->db->where('STD_ID', $std->stdCode ? $std->stdCode:'');
$this->db->update('uoc_std', $data);
$this->db->trans_commit();
}else{
$this->db->insert('uoc_std', $data);
$this->db->trans_commit();
}
}
$this->output->set_header("HTTP/1.1 200 OK");
$message['status'] = 'completed';
echo json_encode($message);
}
function fetchUocStd(){
$setstdAdY = isset($_GET['setstdAdY']) ? $_GET['setstdAdY']:'';
$setssmTmId = isset($_GET['setssmTmId']) ? $_GET['setssmTmId']:'';
$stds = $this->db->query('SELECT *
FROM regist.`rg_Student`
INNER JOIN regist.rg_StudentDetails ON regist.rg_StudentDetails.sdtStdId = regist.`rg_Student`.stdId
left JOIN regist.rg_Prefix ON regist.rg_Prefix.pfId = regist.`rg_Student`.stdPfId
left JOIN mua.ref_perfix ON TRIM( mua.ref_perfix.ref_perfix_name ) = regist.`rg_Prefix`.pfName
left JOIN regist.rg_Province ON regist.rg_Province.prvId = regist.rg_StudentDetails.sdtPrvIdHome
left JOIN peoplecenter.Nation ON peoplecenter.Nation.nationId = regist.rg_StudentDetails.sdtNtId
INNER JOIN regist.rg_Curriculum ON regist.rg_Curriculum.curId = regist.`rg_Student`.stdCurId
INNER JOIN regist.rg_StudentSummary ON regist.rg_StudentSummary.ssmStdId = regist.`rg_Student`.stdId
INNER JOIN regist.rg_StudentStatus ON regist.rg_StudentStatus.sstId = regist.`rg_Student`.stdSstId
WHERE regist.`rg_Student`.stdSstId != 4
AND regist.rg_StudentSummary.ssmAcY = '.$setstdAdY.'
AND regist.rg_StudentSummary.ssmTmId ='.$setssmTmId);
$this->output->set_header("HTTP/1.1 200 OK");
$data['stds'] = $stds->result();
echo json_encode($data);
}
function fetchUocGraduate(){
$setstdAdY = isset($_GET['setstdAdY']) ? $_GET['setstdAdY']:'';
$setssmTmId = isset($_GET['setssmTmId']) ? $_GET['setssmTmId']:'';
$stds = $this->db->query('SELECT *
FROM regist.`rg_Student`
INNER JOIN regist.rg_StudentDetails ON regist.rg_StudentDetails.sdtStdId = regist.`rg_Student`.stdId
left JOIN regist.rg_Prefix ON regist.rg_Prefix.pfId = regist.`rg_Student`.stdPfId
left JOIN mua.ref_perfix ON TRIM( mua.ref_perfix.ref_perfix_name ) = regist.`rg_Prefix`.pfName
left JOIN regist.rg_Province ON regist.rg_Province.prvId = regist.rg_StudentDetails.sdtPrvIdHome
left JOIN peoplecenter.Nation ON peoplecenter.Nation.nationId = regist.rg_StudentDetails.sdtNtId
INNER JOIN regist.rg_Curriculum ON regist.rg_Curriculum.curId = regist.`rg_Student`.stdCurId
INNER JOIN regist.rg_StudentSummary ON regist.rg_StudentSummary.ssmStdId = regist.`rg_Student`.stdId
INNER JOIN regist.rg_StudentStatus ON regist.rg_StudentStatus.sstId = regist.`rg_Student`.stdSstId
WHERE regist.`rg_Student`.`stdSstId` = 4
AND regist.rg_StudentSummary.ssmAcY = '.$setstdAdY.'
group by regist.`rg_Student`.stdId');
$this->output->set_header("HTTP/1.1 200 OK");
$data['stds'] = $stds->result();
echo json_encode($data);
}
/*function fetchSyncNotMath(){
$setstdAdY = isset($_GET['setstdAdY']) ? $_GET['setstdAdY']:'';
$setssmTmId = isset($_GET['setssmTmId']) ? $_GET['setssmTmId']:'';
$stds = $this->db->query('SELECT *
FROM regist.`rg_Student`
INNER JOIN regist.rg_StudentDetails ON regist.rg_StudentDetails.sdtStdId = regist.`rg_Student`.stdId
INNER JOIN regist.rg_Prefix ON regist.rg_Prefix.pfId = regist.`rg_Student`.stdPfId
INNER JOIN regist.rg_Curriculum ON regist.rg_Curriculum.curId = regist.`rg_Student`.stdCurId
INNER JOIN regist.rg_StudentSummary ON regist.rg_StudentSummary.ssmStdId = regist.`rg_Student`.stdId
LEFT JOIN mua.uoc_std ON regist.`rg_Student`.`stdCode` = mua.uoc_std.STD_ID
WHERE
mua.uoc_std.STD_ID IS NULL
/*AND regist.`rg_Student`.stdSstId
IN ( 1, 2, 3 )
AND regist.rg_StudentSummary.ssmAcY = '.$setstdAdY .'
AND regist.rg_StudentSummary.ssmTmId ='.$setssmTmId);
$this->output->set_header("HTTP/1.1 200 OK");
$data['stds'] = $stds->result();
echo json_encode($data);
}*/
function ExportStudy(){
$setstdAdY = isset($_GET['setstdAdY']) ? $_GET['setstdAdY']:'';
$setssmTmId = isset($_GET['setssmTmId']) ? $_GET['setssmTmId']:'';
$data['study'] = $this->db->query('SELECT mua.`uoc_std`. *
FROM mua.`uoc_std`
INNER JOIN regist.`rg_Student` ON regist.`rg_Student`.stdCode = mua.`uoc_std`.`STD_ID`
INNER JOIN regist.rg_StudentSummary ON regist.rg_StudentSummary.ssmStdId = regist.`rg_Student`.stdId
WHERE regist.`rg_Student`.stdSstId != 4 AND regist.rg_StudentSummary.ssmAcY = '.$setstdAdY .'
AND regist.rg_StudentSummary.ssmTmId ='.$setssmTmId);
$this->load->view('eregis/export_mua_study',$data);
}
function ExportGraduate(){
$setstdAdY = isset($_GET['setstdAdY']) ? $_GET['setstdAdY']:'';
$setssmTmId = isset($_GET['setssmTmId']) ? $_GET['setssmTmId']:'';
$data['study'] = $this->db->query('SELECT *
FROM mua.`uoc_std`
INNER JOIN regist.`rg_Student` ON regist.`rg_Student`.stdCode = mua.`uoc_std`.`STD_ID`
INNER JOIN regist.rg_StudentSummary ON regist.rg_StudentSummary.ssmStdId = regist.`rg_Student`.stdId
inner join regist.rg_StudentDetails on regist.rg_StudentDetails.sdtStdId = regist.`rg_Student`.stdId
LEFT JOIN regist.rg_Amphur ON regist.rg_Amphur.apId = regist.rg_StudentDetails.sdtApIdHome
LEFT JOIN mua.ref_sub_district ON mua.ref_sub_district.SUB_DISTRICT_NAME_TH = regist.rg_Amphur.apName
WHERE regist.`rg_Student`.`stdSstId` = 4 AND regist.rg_Student.stdGraduateY = '.$setstdAdY.'
group by mua.`uoc_std`.STD_ID');
$this->load->view('eregis/export_mua_Gradute',$data);
}
function checkphp(){
phpinfo();
}
}
?>
|