header('Content-Type: text/html; charset=tis-620');
include('../db_config.php');
$sql="select * from sk1_sch where level<>'a' ";
$result=mysql_query($sql);
echo "เลือกชื่อโรงเรียน
";
$rw=1;
while ($db=mysql_fetch_array($result)) {
$sql1="select * from sk1_plunch where spc_scode='$db[scode]' ";
$result1=mysql_query($sql1);
$npic= mysql_num_rows($result1);
if ($npic>0) { $cpic="($npic)"; $col='#ccffcc'; } else { $cpic=''; $col='#ffccff'; }
echo "
$rw |
$db[sname] $cpic |
";
$rw++;
}
echo "
";
?>