header('Content-Type: text/html; charset=tis-620');
include('db_config.php');
$sql="select *,count(*) as nsc from sk1_net63 group by sgrp order by sampur,scgrp desc";
$result=mysql_query($sql);
echo <<
·Õè |
¡ÅØèÁâçàÃÕ¹ |
·Ñé§ ËÁ´ |
Êè§ áÅéÇ |
ÃéÍÂÅÐ ·ÕèÊè§ |
TH;
$rw=1; $gsc=0;
while ($db=mysql_fetch_array($result)) {
$sql2="select * from sk1_net63 where sgrp='$db[sgrp]' ";
$result2=mysql_query($sql2);
$gts=$gtk=0;
while ($db2=mysql_fetch_array($result2)) {
if (!empty($db2[send])) { $gsc++; }
}
if ($gsc > 0) { $gg=$gsc; } else { $gg='-'; }
$perc=number_format($gsc*100/$db[nsc],2,'.','');
$tpc=number_format($gtk*100/$gts,2,'.','');
echo <<
$rw |
$db[scgrp] |
$db[nsc] |
$gg |
$perc |
TB;
$rw++; $tgsc+=$gsc; $gsc=0; $tnsc+=$db[nsc];
$ats+=$gts;
$atk+=$gtk;
}
$tperc=number_format($tgsc*100/$tnsc,2,'.','');
$apc=number_format($atk*100/$ats,2,'.','');
echo <<
ÃÇÁ |
$tnsc |
$tgsc |
$tperc |
TF;
?>
|