date_default_timezone_set('Asia/Bangkok'); require_once("../amssplus_connect.php"); mysqli_query($connect,"SET NAMES utf-8"); header('Content-Type: text/html; charset=tis-620'); $code=$_GET['code']; $sql="select *,a.id as sid from system_school a,system_school_group b where a.school_group=b.code and a.school_group='$code' order by a.school_group"; $result=mysqli_query($connect,$sql); echo "
ที่ | โรงเรียน | User | กลุ่มโรงเรียน | "; $rw=1; $total=0; while ($db=mysqli_fetch_array($result)) { $sql2="select school_code from person_sch_main where school_code='$db[school_code]' "; $result2=mysqli_query($connect,$sql2); $nuser=mysqli_num_rows($result2); echo "
---|---|---|---|
$rw | $db[school_name] | $nuser | $db[name] |
รวม | $total |