=1 AND totalYears <=5) ORDER BY totalYears DESC , totalMonths DESC "; $resultlist = $conn->query($countTeacher); }elseif($exp==2){ $text="จำนวนอาจารย์ที่มีประสบการณ์การสอนตั้งแต่ 6-10 ปี"; $no=1; $sum6=0; $countTeacher="SELECT * FROM countTeacher WHERE yearCount='$year' AND (totalYears>=6 AND totalYears <=10) ORDER BY totalYears DESC , totalMonths DESC "; $resultlist = $conn->query($countTeacher); }elseif($exp==3){ $text="จำนวนอาจารย์ที่มีประสบการณ์การสอนตั้งแต่ 11-15 ปี"; $no=1; $sum6=0; $countTeacher="SELECT * FROM countTeacher WHERE yearCount='$year' AND (totalYears>=11 AND totalYears <=15) ORDER BY totalYears DESC , totalMonths DESC "; $resultlist = $conn->query($countTeacher); }elseif($exp==4){ $text="จำนวนอาจารย์ที่มีประสบการณ์การสอนตั้งแต่ 16-20 ปี"; $no=1; $sum6=0; $countTeacher="SELECT * FROM countTeacher WHERE yearCount='$year' AND (totalYears>=16 AND totalYears <=20) ORDER BY totalYears DESC , totalMonths DESC "; $resultlist = $conn->query($countTeacher); }elseif($exp==5){ $text="จำนวนอาจารย์ที่มีประสบการณ์การสอนตั้งแต่ 21-25 ปี"; $no=1; $sum6=0; $countTeacher="SELECT * FROM countTeacher WHERE yearCount='$year' AND (totalYears>=21 AND totalYears <=25) ORDER BY totalYears DESC , totalMonths DESC "; $resultlist = $conn->query($countTeacher); }elseif($exp==6){ $text="จำนวนอาจารย์ที่มีประสบการณ์การสอนตั้งแต่ 26-30 ปี"; $no=1; $sum6=0; $countTeacher="SELECT * FROM countTeacher WHERE yearCount='$year' AND (totalYears>=26 AND totalYears <=30) ORDER BY totalYears DESC , totalMonths DESC "; $resultlist = $conn->query($countTeacher); }elseif($exp==7){ $text="จำนวนอาจารย์ที่มีประสบการณ์การสอนมากกว่า 30 ปี ขึ้นไป"; $no=1; $sum6=0; $countTeacher="SELECT * FROM countTeacher WHERE yearCount='$year' AND (totalYears>30) ORDER BY totalYears DESC , totalMonths DESC "; $resultlist = $conn->query($countTeacher); }elseif($exp==8){ $text="จำนวนอาจารย์ที่มีประสบการณ์การสอนทั้งหมด"; $no=1; $sum6=0; $countTeacher="SELECT * FROM countTeacher WHERE yearCount='$year' ORDER BY totalYears DESC , totalMonths DESC "; $resultlist = $conn->query($countTeacher); } ?> <?=$text?> ปีการศึกษา <?=$year?>

ปีการศึกษา

num_rows > 0) { while($valuelist = $resultlist->fetch_assoc()) { $NameData=$valuelist['title'].$valuelist['Name']." ".$valuelist['Surname']; $EducationalBackground=$valuelist['EducationalBackground']; if($EducationalBackground=="PhD"){$edu="ปริญญาเอก";} if($EducationalBackground=="MD"){$edu="ปริญญาโท";} if($EducationalBackground=="BD"){$edu="ปริญญาตรี";} ?>
ลำดับ ชื่อ-นามสกุล ตำแหน่งวิชาการ วุฒิการศึกษา วันที่เริ่มสอน นับถึงวันที่ สอนมา(ปี) สอนมา(เดือน) ช่วงเวลาการนับ
รวมนับจำนวนอาจารย์ คน