��ػ�����ҧ��� ��.�����͡�� ʾ�.�������� �� 1 �� 2554";
echo "";
echo "";
$row=1; $tg=0; $ts=0; $tb=0; $tt=0; $trp1=0; $trp2=0;
while ($db=mysql_fetch_array($result)) {
$total=$db[go]+$db[sv]+$db[bn];
$sql1="select kd_remark,kd_sp,kd_code,kd_sch from ssk161_data
where kd_sch='$db[scode]' and kd_remark='1'
and kd_code not like 'sp%' group by kd_code,kd_sch";
$result1=mysql_query($sql1);
$rep1=mysql_num_rows($result1);
$sql2="select kd_remark,kd_sp,kd_code,kd_sch from ssk161_data
where kd_sch='$db[scode]' and kd_sp='1'
and kd_code not like 'sp%' group by kd_code,kd_sch";
$result2=mysql_query($sql2);
$rep2=mysql_num_rows($result2);
if ($db[go]>0) { $gg=$db[go]; } else { $gg='-'; }
if ($db[sv]>0) { $ss=$db[sv]; } else { $ss='-'; }
if ($db[bn]>0) { $bb=$db[bn]; } else { $bb='-'; }
if ($rep1>0) { $rr1="$rep1"; } else { $rr1='-'; }
if ($rep2>0) { $rr2="$rep2"; } else { $rr2='-'; }
if ($total>0) { $tot=$total; } else { $tot='-'; }
echo "";
$row++ ; $tg+=$db[go]; $ts+=$db[sv]; $tb+=$db[bn]; $tt+=$total; $trp1+=$rep1; $trp2+=$rep2;
}
echo "
��� |
�ç���¹ |
 |
 |
 |
��� |
����� | ���᷹�ѧ��Ѵ | ���᷹�Ҥ |
$row |
$db[sname] |
$gg | $ss |
$bb | $tot |
$db[abb_sch] | $rr2 | $rr1 |
��� ��.�����͡�� |
$tg |
$ts |
$tb |
$tt | |
$trp2 | $trp1 |
";
?>