header('Content-Type: text/html; charset=tis-620');
include('../db_config.php');
$sql="select * from sch where scgrp='$sg' and onetb='1' ";
$result=mysql_query($sql);
echo "
ที่ |
โรงเรียน |
ความคิดเห็น |
";
$rw=1;
while ($db=mysql_fetch_array($result)) {
$sql1="select * from sk1_onetb where scode='$db[scode]' ";
$result1=mysql_query($sql1);
$nrec=mysql_num_rows($result1);
if (! empty($nrec)) { $ast="$nrec"; } else { $ast='-'; }
echo "
$rw |
$db[sname] |
$ast |
";
$rw++; $trec+=$nrec;
$nrec=0;
}
$tstd=number_format($tstd,0,'.',',');
echo "
รวม |
$trec |
";
?>