header('Content-Type: text/html; charset=tis-620');
include('../db_config.php');
$sql="select * from sk1_inf62_6m a,sk1_sch b where a.smis=b.smis and b.scgrp='$sg' ";
$result=mysql_query($sql);
echo "
ที่ |
โรงเรียน |
รายงาน |
";
$rw=1; $tn=0;
while ($db=mysql_fetch_array($result)) {
if ($db[e_inv]+$db[e_pd]+$db[i_inv]+$db[i_pd] > 0) {
$ast='';
$tn++;
} else {
$ast='';
}
echo "
$rw |
$db[sname] |
$ast |
";
$rw++;
$ttn+=$tn;
$tn=0;
}
//$ttn=number_format($ttn,0,'.',',');
echo "
รวม |
$ttn |
";
?>