";
$rw=1; $tt1=0; $tt2=0;
while ($db=mysql_fetch_array($result)) {
$kgp=$db[ef_grp];
$sql1="select * from $_data,$_act
where kd_code=kp_code and kd_code like '$kgp%' group by kp_code,kp_grp";
$result1=mysql_query($sql1);
$res=mysql_num_rows($result1);
$pc=number_format($res*100/$db[ef_act],2,".",",");
echo "