⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group_by_score.asp

📁 一套在线考试系统
💻 ASP
字号:
<!--#include file="conn.asp"-->
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>在线考试系统 — 统计表</title>
<style>
<!--
td           { font-size: 10pt }
-->
</style>
</head>

<body>

<table border="0" width="100%" height="30">
  <tr>
    <td width="100%" align="center"><b>考试成绩<%=request("str")%>统计表</b></td>
  </tr>
  <tr>
    <td width="100%" align="center">
      <p align="right">考试编号:<%=request("examid")%></td>
  </tr>
</table>
<table border="1" width="100%" style="border-collapse: collapse;" cellpadding="2" cellspacing="0" bordercolor="#000000">
  <tr>
    <td width="20%" align="center"> </td>
    <td width="20%" align="center"><b>人数</b></td>
  </tr>
<%
sql="select count(*) as countper from view_score where examid='" & request("examid") & "' and score>=90 and score<=100"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1
%>
  <tr>
    <td width="20%" align="center"><b>90-100分 </b></td>
    <td width="20%" align="center"><%=rs("countper")%> </td>
  </tr>
<%
rs.close
%>
<%
sql="select count(*) as countper from view_score where examid='" & request("examid") & "' and score>=80 and score<90"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1
%>
  <tr>
    <td width="20%" align="center"><b>80-90分 </b></td>
    <td width="20%" align="center"><%=rs("countper")%> </td>
  </tr>
<%
rs.close
%>
<%
sql="select count(*) as countper from view_score where examid='" & request("examid") & "' and score>=70 and score<80"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1
%>
  <tr>
    <td width="20%" align="center"><b>70-80分 </b></td>
    <td width="20%" align="center"><%=rs("countper")%> </td>
  </tr>
<%
rs.close
%>
<%
sql="select count(*) as countper from view_score where examid='" & request("examid") & "' and score>=60 and score<70"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1
%>
  <tr>
    <td width="20%" align="center"><b>60-70分 </b></td>
    <td width="20%" align="center"><%=rs("countper")%> </td>
  </tr>
<%
rs.close
%>
<%
sql="select count(*) as countper from view_score where examid='" & request("examid") & "' and score>=50 and score<60"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1
%>
  <tr>
    <td width="20%" align="center"><b>50-60分 </b></td>
    <td width="20%" align="center"><%=rs("countper")%> </td>
  </tr>
<%
rs.close
%>
<%
sql="select count(*) as countper from view_score where examid='" & request("examid") & "' and score>=40 and score<50"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1
%>
  <tr>
    <td width="20%" align="center"><b>40-50分 </b></td>
    <td width="20%" align="center"><%=rs("countper")%> </td>
  </tr>
<%
rs.close
%>
<%
sql="select count(*) as countper from view_score where examid='" & request("examid") & "' and score>=30 and score<40"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1
%>
  <tr>
    <td width="20%" align="center"><b>30-40分 </b></td>
    <td width="20%" align="center"><%=rs("countper")%> </td>
  </tr>
<%
rs.close
%>
<%
sql="select count(*) as countper from view_score where examid='" & request("examid") & "' and score>=20 and score<30"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1
%>
  <tr>
    <td width="20%" align="center"><b>20-30分 </b></td>
    <td width="20%" align="center"><%=rs("countper")%> </td>
  </tr>
<%
rs.close
%>
<%
sql="select count(*) as countper from view_score where examid='" & request("examid") & "' and score>=10 and score<20"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1
%>
  <tr>
    <td width="20%" align="center"><b>10-200分 </b></td>
    <td width="20%" align="center"><%=rs("countper")%> </td>
  </tr>
<%
rs.close
%>
<%
sql="select count(*) as countper from view_score where examid='" & request("examid") & "' and score>=0 and score<0"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,1
%>
  <tr>
    <td width="20%" align="center"><b>0-10分 </b></td>
    <td width="20%" align="center"><%=rs("countper")%> </td>
  </tr>
<%
rs.close
%>
</table>

</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -