header('Content-Type: text/html; charset=tis-620');
include('../db_config.php');
$sql="select * from sk1_plunch,sk1_sch
where spc_scode=scode group by spc_scode";
$result=mysql_query($sql);
echo "
รูปภาพกิจกรรมอาหารกลางวัน รร.
ที่ |
โรงเรียน |
ส่งภาพ |
";
$rw=1;
while ($db=mysql_fetch_array($result)) {
$sql1="select * from sk1_lunch where spc_scode='$db[spc_scode]' ";
$result1=mysql_query($sql1);
$pre=mysql_num_rows($result1);
$sql2="select * from sk1_plunch where spc_scode='$db[spc_scode]' ";
$result2=mysql_query($sql2);
$post=mysql_num_rows($result2);
echo "
$rw |
$db[sname] |
$post |
";
$rw++;
$tpost+=$post;
}
$tpost=number_format($tpost);
echo "
รวม |
$tpost |
";
?>