少个条件语句要怎么写呀?/
分页了.但是显示了25条之后的数据,是不是在红色处少条件呀??<html>
<head>
<title>十五管理</title>
</head>
<%
set conn=server.createobject("adodb.connection")
DSNtemp = "Driver={Microsoft Access Driver (*.mdb)};"
DSNtemp = DSNtemp & "DBQ=" & server.mappath("/swd/date/student.mdb")
conn.open DSNtemp
stext = "select * from stu order by banji desc"
set rs = conn.execute(stext)
if rs.eof then
response.write "database error"
response.end
end if
%>
<%
'set conn=server.createobject("adodb.connection")
'conn.open("DRIVER=Driver do Microsoft ACCESS (*.mdb);dbq="&server.mappath("student.mdb"))
set rs=server.createobject("adodb.recordset")
sql="select * from stu"
rs.open sql,conn,3
rs.pagesize=25
if request("page")<>"" then
epage=cint(request("page"))
if epage<1 then epage=1
if epage>rs.pagecount then epage=rs.pagecount
else
epage=1
end if
rs.absolutepage=epage
%>
<body>
<!--页面左边开始--> <form name="form1" method="post" action="/swd/ss_zy.asp">
相关操作:
<a href="#">量化细则</a></font> | <a href="file:///f|/%d0%c2%bd%a8%ce%c4%bc%fe%bc%d0%20(2)/mybbs/swd/index.asp">所有学员</a>
| <a href="file:///f|/%d0%c2%bd%a8%ce%c4%bc%fe%bc%d0%20(2)/mybbs/swd/index1.asp">后台管理</a> </font>
<td>姓名
<input name="xingming" type="text" maxlength="10" size="15">
班级
<input name="banji" type="text" maxlength="10" size="15"> <input name="submit" type="submit" value="显示学员">
</td>
</form>
</div>
<!--页面左边结束-->
<!--页面右边开始-->
<table width="970" border="1" cellpadding="0" cellspacing="0" bgcolor="#C7E8F8" align=center>
<!--DWLayoutTable-->
<tr>
<td height="22"><div align="center">编号 </div></td>
<td width="117"> <div align="center">姓名</div></td>
<td> <div align="center">职务</div></td>
<td> <div align="center">教学班</div></td>
<td width="117" > <div align="center">民族</div></td>
<td> <div align="center">政治面貌</div></td>
<td width="117" > <div align="center">籍贯</div></td>
<td> <div align="center">入伍时间</div></td>
<td> <div align="center">文化程度</div></td>
<td> <div align="center"><font color="#FF0000">量化得分</font></div></td>
</tr>
<%
Do while not rs.eof
%> <TR>
<td height="22"><div align="center"> <%=rs("id") %></div></td>
<TD ><div align="center"><%=rs("xingming") %></div></TD>
<td><div align="center"><%=rs("zhiwu") %></div></td>
<td><div align="center"><%=rs("banji") %></div></td>
<td ><div align="center"><%=rs("minzu") %></div></td>
<td><div align="center"><%=rs("zhengzhimianmao") %></div></td>
<td ><div align="center"><%=rs("jiguan") %></div></td>
<td><div align="center"><%=rs("ruwushijian") %></div></td>
<td><div align="center"><%=rs("wenhuachengdu") %></div></td>
<td><div align="center"><a href='/swd/lhdf.asp?id=<%=rs("id") %>' target="_blank"><%=rs("lianghuadefeng") %></a></div></td>
</tr>
<%
rs.movenext
Loop
%> </table><br>
<p align="center">
</p>
<p align="center">现在是第<%=epage%>页,一共有<%=rs.pagecount%>页 <a href="/swd/index.ASP"><font color="#0099FF">首页</font></a>
<a href="/swd/index.ASP?page=<%=epage-1%>"><font color="#0099FF">前一页</font></a>
<a href="/swd/index.ASP?page=<%=epage+1%>"><font color="#0099FF">后一页</font></a>
<a href="/swd/index.ASP?page=<%=rs.pagecount%>"><font color="#0099FF">末页</font></a>
<td colspan="2" align="right">
</form></p>
<p></p>
</div>
<%
rs.close
conn.close
%>
</font></a>
<td colspan="2" align="right">
</form></p>
<p></p>
</div>
<%
rs.close
conn.close
%>
<!--用户登陆 -->
<!--页面右边结束-->
<!--页面底部开始-->
</body>
</html>