" ; header('Content-Type: text/html; charset=tis-620'); include("../header.php"); echo ""; include('db_config.php'); $sql0="SELECT * FROM $_sch where scgrp='$scg' order by sampur,scgrp,scode"; $result0=mysql_query($sql0); $db0=mysql_fetch_array($result0); $sql="SELECT * FROM $_sch where scgrp='$scg' order by sampur,scgrp,scode"; $result=mysql_query($sql); echo "รายชื่อเลือกสถานศึกษา สมัครเข้าแข่งขัน กลุ่ม $db0[sgrp] "; echo ""; echo ""; $tst=0; $rw=1; while ($db=mysql_fetch_array($result)) { if ($db[scode] != 000) { $sql2="select kd_sch from $_data where kd_sch=$db[scode] "; $result2=mysql_query($sql2); $nst=mysql_num_rows($result2); if ($nst==0) { $nst="-" ; } if ($db[level]=='o') { $stype='ขยายโอกาส'; } elseif($db[level]=='a') { $stype='เอกชน/อปท.'; } else { $stype=''; } // $stype=''; echo ""; $tst+=$nst; $rw++; } } echo "
ที่ สถานศึกษา (คลิกเพื่อสมัคร) กลุ่ม รร. ประเภท รร. สมัครแล้ว(คน)
$rw $db[sname] $db[abb_sch] $stype $nst
รวมกลุ่ม $db0[sgrp] $tst
"; ?>