$scid=$_GET["scid"];
header('Content-Type: text/html; charset=tis-620');
echo "";
global $scid;
include('db_config.php');
$sql0="select scode,sname,sgrp from $_reg where scode='$scid'" ;
$result0=mysql_query($sql0);
$db0=mysql_fetch_array($result0);
$scname=$db0[sname];
$sgrp=$db0[sgrp];
$sql="SELECT * FROM $_act,$_data
WHERE kd_code=kp_code and kd_sch='$scid' and g+s+b>0
order by g desc,s desc,b desc,kd_code";
$result=mysql_query($sql);
echo "สรุปเหรียญรางวัล แยกประเภท สพป.$scname $_title";
echo "