header('Content-Type: text/html; charset=tis-620');
echo "";
include('db_config.php');
$sql0="select * from $_sc where scc='$sc' " ;
$result0=mysql_query($sql0);
$db0=mysql_fetch_array($result0);
$sname=$db0[scn];
$sreg=$db0[scregion];
$sql="SELECT * FROM $_act,$_data
WHERE kd_code=kp_code and kd_school='$sc' and g+s+b>0
group by kd_school,kd_code
order by g desc,s desc,b desc,kd_code";
$result=mysql_query($sql);
echo "สรุปเหรียญรางวัล $sname สพป.$sreg $_title";
echo "