<%rs.movenext%>
<%loop%>
</select>
<%rs.close%></td>
<td width="33%" align="center">
<%
set rs1=server.createobject("adodb.recordset")
sql1="select * from dk"
rs1.open sql1,conn,1,1
%>
<select size="1" name="testno">
<%do while not rs1.eof%>
<option value="<%=rs1("testno")%>"><%=rs1("testno")%></option>
<%rs1.movenext%>
<%loop%>
</select>
<%rs1.close%></td>
<%set rs2=server.createobject("adodb.recordset")
sql2="select * from kc"
rs2.open sql2,conn,1,1
%>
<td width="34%" align="center"><select size="1" name="subject"><%do while not rs2.eof%>
<option value="<%=rs2("kc")%>"><%=rs2("kc")%></option><%rs2.movenext%>
<%loop%>
<%rs2.close%>
</select>
</td>
</tr>
</table>
</center>
<p align="right"><input type="submit" value="提交" name="B1"></p>
</form>
<center>
</td>
</tr>
</table>
</div>
</body>
</html>
排名功能实现代码dkpm b.asp
<!--#include file="data.asp"-->
<!--#include file="user.asp"-->
<%
dim user_class,subject,testno
user_class=trim(request("user_class"))
subject=trim(request("subject"))
testno=trim(request("testno"))
%>
<%
set rs=server.createobject("adodb.recordset")
if user_class="all" then
sql="select * from cj where subject='"&subject&"' and testno='"&testno&"' order by cj desc"
else
sql="select * from cj where user_class='"&user_class&"' and subject='"&subject&"' and testno='"&testno&"' order by cj desc"
end if
rs.open sql,conn,1,1
%>
<html>
<head>
<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>
<link rel="stylesheet" href="style.css">
</head>
<body topmargin="0">
<!--#include file="top.asp"-->
<div align="center">
<center>
<table width="738" height="35">
<td background="images/top_1.jpg"> <a href="cjgl.asp">统考成绩列表</a>
| <a href="search_st.asp">添加统考成绩
| <a href="dkcjcx.asp">单科成绩排行榜</a> | <a href="zcjcx.asp">总分成绩排行榜</a>
</center>
</div>
<div align="center">
<table border="1" width="600" cellspacing="0" cellpadding="4" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr>
<td width="388" colspan="6" align="center">
<p align="left">查询结果</p>
</td>
</tr>
<center>
<%
if Not(rs.bof and rs.eof) then'判别数据表中是否为空记录
NumRecord=rs.recordcount
rs.pagesize=10
NumPage=rs.Pagecount
if request("page")=empty then
NoncePage=1
else
if Cint(request("page"))<1 t