ตรวจสอบข้อมูลอาจารย์ผู้สอน
ปีการศึกษา 
ภาค 
รหัสวิชา
** รหัสวิชา 8 หลัก หรือ 5 หลักแรก
 

"" and $TSm<>""){ echo "ปีการศึกษา 25$TYr"; switch ($TSm) { case '1':{ echo " ภาค ต้น"; break;} case '2':{ echo " ภาค ปลาย"; break;} case '0':{ echo " ภาค ฤดูร้อน"; break;} } } ?>
'.' วิทยาเขต:'. $result[0].'
'; } ora_close($cn_dbu);*/ /*if ($campus_id=='B') //// 19/11/2552 { $sql="select cs_code,COURSE_NAM from all_course where cs_code like '$cs_code' and sm='$TSm' and yr='$TYr' and cs_code in (select distinct cs_code from register where sm_sem='$TSm' and sm_yr='$TYr' and lc_section < 700 and lb_section<700) order by cs_code "; }elseif ($campus_id=='K'){ $sql="select cs_code,COURSE_NAM from all_course where cs_code like '$cs_code%' and sm='$TSm' and yr='$TYr' and cs_code in (select distinct cs_code from register where sm_sem='$TSm' and sm_yr='$TYr' and ((lc_section between 700 and 799) or (lb_section between 700 and 799) )) order by cs_code "; }else{ $sql="select cs_code,COURSE_NAM from course where cs_code like '$cs_code%' and sm='$TSm' and yr='$TYr' and cs_code in (select distinct cs_code from register where sm_sem='$TSm' and sm_yr='$TYr' and lc_section < 700 and lb_section<700) order by cs_code "; }*/ // 19/11/2552 $cs_code=trim($cs_code); //$sql="select cs_code,COURSE_NAM from all_course where cs_code like '$cs_code%' and sm='$TSm' and yr='$TYr' and cs_code in (select distinct cs_code from register where sm_sem='$TSm' and sm_yr='$TYr') order by cs_code "; // 19/11/2552 $sql="select cs_code,COURSE_NAM from all_course where cs_code like '$cs_code%' and sm='$TSm' and yr='$TYr' order by cs_code "; // 04/03/2555 //echo $sql; $cn_dbu=ora_open($fn); $pn_u=ora_parse($cn_dbu,$sql); $rn_u=ora_exec($cn_dbu); $n=1; //echo $sql."
"; while(ora_fetch_into($cn_dbu,&$result)) { $sqlTmp="select distinct q_code from teacher where q_code='$result[0]' and semester='$TSm' and yr='$TYr' "; $cn_dbu2=ora_open($fn); $pn_u2=ora_parse($cn_dbu2,$sqlTmp); $rn_u2=ora_exec($cn_dbu2); $flag=false; while(ora_fetch_into($cn_dbu2,&$result2)){ $flag=true; $sqlSel="select count(*) from teacher where q_code='$result[0]' and semester='$TSm' and yr='$TYr' and (substr(advisor_id,2,4)='0000' or advisor_id is null) "; $cn_dbu3=ora_open($fn); $pn_u3=ora_parse($cn_dbu3,$sqlSel); $rn_u3=ora_exec($cn_dbu3); ora_fetch_into($cn_dbu3,&$result3); if($result3[0]>0) $tmp=" * ไม่มีรายชื่ออาจารย์ผู้สอน"; else $tmp=""; } if(!$flag) $tmp=" * ไม่มีรายชื่ออาจารย์ผู้สอน"; ?>
ลำดับที่
รหัสวิชา
ชื่อวิชา