header('Content-Type: text/html; charset=tis-620');
include('../db_config.php');
$sql="select * from sk1_sch where scgrp='$sg' ";
$result=mysql_query($sql);
echo "
ที่ |
โรงเรียน |
จำนวนจิตอาสา |
";
$rw=1; $tsch=0;
while ($db=mysql_fetch_array($result)) {
$njit=$db[jit_kru]+$db[jit_per]+$db[jit_off]+$db[jit_oth];
if ($db[jit_kru] != '' ) {
$ast="$njit คน";
$tsch++;
} else {
$ast='-';
}
echo "
$rw |
$db[sname] |
$ast |
";
$rw++;
}
$tstd=number_format($tstd,0,'.',',');
echo "
รวม |
$tsch |
";
?>