<%@ language=vbscript %>
<html>
<head>
<meta name="generator" content="microsoft visual studio 6.0">
</head>
<body>
<p align=center><strong><font color=crimson face="" size=4>
<%=request.querystring("sub")%>课的考试成绩
</font></strong></p>
<p align=center><font color=dodgerblue face="" size=2>
任课教师:<%=request("teachname")%>
</font></p>
<p align=center>
<table border=0 cellpadding=1 cellspacing=1 width=75%>
<tr bgcolor=peachpuff>
<td>姓名</td>
<td>成绩</td>
<td>名次</td></tr>
<%
set conn=server.createobject("adodb.connection")
conn.connectionstring="dsn=testsys"
conn.open
声明sql查询语句,从数据库中查询相应科目的考试成绩,查询结构按降序方式排序
strsql="select score.score, studentinfo.stname from score,studentinfo where score.stid = studentinfo.stid and teachid=" & request.querystring("teachid") & " and score.sub=" & request.querystring("sub") & " order by score.score desc"
set mrs=conn.execute(strsql)
i=1
while not mrs.eof
以表格的形式显示相应考试科目的成绩和学生姓名
response.write "<tr>"
response.write "<td>"
response.write mrs("stname")
response.write "</td>"
response.write "<td>"
response.write mrs("score")
response.write "</td>"
response.write "<td>" & i & "</td></tr>"
i=i+1
mrs.movenext
wend
conn.close
set conn=nothing
%>
<tr bgcolor=peachpuff><td></td><td></td><td></td></tr>
</table>
</p>
</body>
</html>
网络考场(17)(转)tviewscore.asp
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 网络考场(17)(转)tviewscore.asp
相关推荐
- 暂无文章
