"; include('db_config.php'); mysql_query("TRUNCATE TABLE tmpkap5"); mysql_query("insert into tmpkap5 (SELECT * FROM $_data group by kd_sch,kd_code,g,s,b,kd_sp)"); $sql="select * from $_reg order by eef2014 limit 0,10"; $result=mysql_query($sql); echo "
ػ­¡ ٧ش 10 ӴѺá ʾ."; echo ""; echo ""; $row=1; $s1=0; $s2=0; $s3=0; $s4=0; $s5=0; $s6=0; $s7=0; $s8=0; $s9=0; $s10=0; $s11=0; $s12=0; $ts=0; while ($db=mysql_fetch_array($result)) { $sql1="select * from tmpkap5,$_reg,$_act WHERE kd_sch=scode and kd_code=kp_code and kd_sch='$db[scode]' and kp_cd='01' and g>0"; /* */ $result1=mysql_query($sql1); $s1=mysql_num_rows($result1); /* $sql2="select * from tmpkap5,$_reg,$_act WHERE kd_sch=scode and kd_code=kp_code and kd_sch='$db[scode]' and kp_cd='02' and g>0"; $result2=mysql_query($sql2); $s2=mysql_num_rows($result2); $sql3="select * from tmpkap5,$_reg,$_act WHERE kd_sch=scode and kd_code=kp_code and kd_sch='$db[scode]' and kp_cd='03' and g>0"; $result3=mysql_query($sql3); $s3=mysql_num_rows($result3); $sql6="select * from tmpkap5,$_reg,$_act WHERE kd_sch=scode and kd_code=kp_code and kd_sch='$db[scode]' and kp_cd='06' and g>0"; $result6=mysql_query($sql6); $s6=mysql_num_rows($result6); $sql10="select * from tmpkap5,$_reg,$_act WHERE kd_sch=scode and kd_code=kp_code and kd_sch='$db[scode]' and kp_cd='10' and g>0"; $result10=mysql_query($sql10); $s10=mysql_num_rows($result10); */ $sql4="select * from tmpkap5,$_reg,$_act WHERE kd_sch=scode and kd_code=kp_code and kd_sch='$db[scode]' and kp_cd='16' and g>0"; /* Է ѡԹ */ $result4=mysql_query($sql4); $s4=mysql_num_rows($result4); $sql5="select * from tmpkap5,$_reg,$_act WHERE kd_sch=scode and kd_code=kp_code and kd_sch='$db[scode]' and kp_cd='05' and g>0"; /* ѧ */ $result5=mysql_query($sql5); $s5=mysql_num_rows($result5); $sql7="select * from tmpkap5,$_reg,$_act WHERE kd_sch=scode and kd_code=kp_code and kd_sch='$db[scode]' and kp_cd='07' and g>0"; /* Ż */ $result7=mysql_query($sql7); $s7=mysql_num_rows($result7); $sql8="select * from tmpkap5,$_reg,$_act WHERE kd_sch=scode and kd_code=kp_code and kd_sch='$db[scode]' and kp_cd='08' and g>0"; /* çҹ */ $result8=mysql_query($sql8); $s8=mysql_num_rows($result8); $sql9="select * from tmpkap5,$_reg,$_act WHERE kd_sch=scode and kd_code=kp_code and kd_sch='$db[scode]' and kp_cd='09' and g>0"; /* */ $result9=mysql_query($sql9); $s9=mysql_num_rows($result9); $sql11="select * from tmpkap5,$_reg,$_act WHERE kd_sch=scode and kd_code=kp_code and kd_sch='$db[scode]' and kp_cd='11' and g>0"; /* Ѳ */ $result11=mysql_query($sql11); $s11=mysql_num_rows($result11); $sql12="select * from tmpkap5,$_reg,$_act WHERE kd_sch=scode and kd_code=kp_code and kd_sch='$db[scode]' and kp_cd='12' and g>0"; /* ҹ */ $result12=mysql_query($sql12); $s12=mysql_num_rows($result12); $sql13="select * from tmpkap5,$_reg,$_act WHERE kd_sch=scode and kd_code=kp_code and kd_sch='$db[scode]' and kp_cd='13' and g>0"; /* ¹ */ $result13=mysql_query($sql13); $s13=mysql_num_rows($result13); $ts=$s1+$s4+$s5+$s7+$s8+$s9+$s10+$s11+$s12+$s13; if ($s1==0) { $s1='-'; } if ($s4==0) { $s4='-'; } if ($s5==0) { $s5='-'; } if ($s7==0) { $s7='-'; } if ($s8==0) { $s8='-'; } if ($s9==0) { $s9='-'; } if ($s11==0) { $s11='-'; } if ($s12==0) { $s12='-'; } if ($s13==0) { $s13='-'; } if ($total>0) { $tot=$total; } else { $tot='-'; } $res=$row%2; if ($res==0) { $cl='#FFEBBF'; } else { $cl='#FFEFCE'; } echo ""; $row++ ; } echo "
ʾ. ӹǹ­ҧ ¡С¹ (੾­ͧ)
Է ѧ Ż çҹ Ѳ ҹ
2 5 5 74 18 12 5 10 41
$row $db[abb_sch] $s1 $s4 $s5 $s7 $s8 $s9 $s11 $s12 $s13 $ts
[ ­ͧ ¡ ء ʾ. ]
"; ?>