header('Content-Type: text/html; charset=tis-620');
include('../db_config.php');
$sql="select * from sk1_sch,sk1_dltv62 where smis=dl_smis and dl_target= '1' and scgrp='$sg' ";
$result=mysql_query($sql);
echo "
ที่ |
โรงเรียน |
แจ้ง DLTV |
";
$rw=1; $tn=0;
while ($db=mysql_fetch_array($result)) {
$sql1="select * from sk1_dltv62 where dl_smis='$db[smis]' and dl_none<>'' ";
$result1=mysql_query($sql1);
$n=mysql_num_rows($result1);
if ($n>0) { $ast=$n; } else { $ast='-'; }
echo "
$rw |
$db[sname] |
$ast |
";
$rw++; $tn+=$n;
}
$tstd=number_format($tn,0,'.',',');
echo "
รวม |
$tn |
";
?>