echo ""; //include('header.php'); header('Content-Type: text/html; charset=tis-620'); include_once('db_config.php'); mysqli_query($con,"TRUNCATE TABLE tmpsp3"); mysqli_query($con,"insert into tmpsp3 (SELECT * FROM $_data group by kd_sch,kd_code,g,s,b)"); $sql="select *,left(kp_code,2) as gr,sum(g) as g,sum(s) as s,sum(b) as b from tmpsp3,$_act where kp_code=kd_code group by gr order by kp_grp"; $result=mysqli_query($con,$sql); echo "
·Õè | »ÃÐàÀ·¡ÕÌÒ | ·Í§ | à§Ô¹ | ·Í§á´§ | ÃÇÁ |
$rw | $db[kp_grp] | $gg | $ss | $bb | $tot |
ÃÇÁ | $tg | $ts | $tb | $total |