header('Content-Type: text/html; charset=tis-620');
include('../db_config.php');
//$sql="select * from sk1_sch where scgrp='$sg' ";
$sql="select * from sk1_std59 a,sk1_sch b
where a.scode=b.scode and b.scgrp != 'prv' and scgrp='$sg' and
(a.a1m+a.a2m+a.p1m+a.p2m+a.p3m+a.p4m+a.p5m+a.p6m+ a.m1m+a.m2m+a.m3m+a.m4m+a.m5m+a.m6m+a.a1f+a.a2f+a.p1f+a.p2f+
a.p3f+a.p4f+a.p5f+p6f+a.m1f+a.m2f+a.m3f+a.m4f+a.m5f+a.m6f) <= 300 ";
$result=mysql_query($sql);
echo "
ที่ |
โรงเรียน |
แจ้งขอสื่อ |
";
$rw=1;
while ($db=mysql_fetch_array($result)) {
if ($db[ipst_name] !='' ) {
$ast="แจ้งแล้ว";
} else {
$ast='-';
}
echo "
$rw |
$db[sname] |
$ast |
";
$rw++; $tstd+=$db[ipst];
}
$tstd=number_format($tstd,0,'.',',');
echo "
รวม |
$tstd |
![](images/back.png)
";
?>