header('Content-Type: text/html; charset=utf8'); include('../db_config.php'); $sql="select *,count(*) as nstd from inpack group by smis order by smis "; $result=mysql_query($sql); echo <<
ที่ | รหัส โรงเรียน |
ชื่อโรงเรียน | จำนวน นักเรียน |
$rw | $db[smis] | $db[sname] | $db[nstd] | TB; $rw++; $tstd+=$db[nstd]; } echo <<รวม | $tstd |