csz说得正确的,
另:我的目的是想要实现分页,每页8行,但是现在实现不了分页了,
已有九条数据, 全部显示在一页, 而且页面最下面显示不出页号,
这是为什么?
我把它全贴出来了。
<!--#include file="conn.asp"-->
<% pageno=request.querystring("pageno") %>
<!--获得查询者输入信息-->
<% seek_name=Trim(Request("txt_name"))
seek_xueli=Trim(Request("sel_xueli"))
seek_zhicheng=Trim(Request("sel_zhicheng"))
seek_zhuangkuang=Trim(Request ("sel_zhuangkuang")) %>
<!--如果查询者什么都没有输入-->
<% if((seek_name="") and (seek_xueli="选择") and (seek_zhicheng="选择") and (seek_zhuangkuang="选择")) then
%>
<% Response.Write "您没有输入查询条件!" %>
<% Response.End%>
<% end if %>
<html>
<head>
<title>Untitleddo
cument</title>
<meta http-equiv="Content-Type" content="text/html;
charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="467" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="162" height="68" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="162" height="68">
<p align="center"><a href="index_people.htm">回到查询</a></p>
</td>
</tr>
</table>
</td>
<td width="163" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="163" height="68">
<div align="center"><font color="#FF3333">查询结果</font></div>
</td>
</tr>
</table>
</td>
<td width="142" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="142" height="68">
<div align="center"><a href="insert.asp">增加</a></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>
<%
sql_text="select * from lyb where "
'<!--查看是否输入了人名-->
if seek_name="" then
'<!--如果没有输入人名-->
sql_text=sql_text
else
'<!--如果输入了人名-->
sql_name="name ='" &
seek_name &
"'"
sql_text = sql_text &
sql_name
end if
'<!--查看是否选择了学历-->
if seek_xueli="选择" then
'<!--如果没有选择学历-->
sql_text=sql_text
else
if (seek_name<>"") then
'<!--在前面输入了要查询的人名-->
sql_xueli= "and xl= '"&
seek_xueli&"'"
else
sql_xueli=" xl ='" &
seek_xueli&"'"
end if
sql_text=sql_text &
sql_xueli
end if
'<!--查看是否选择了职称-->
if seek_zhicheng="选择" then
'<!--如果没有选择职称-->
sql_text=sql_text
else
if ((seek_name<>"") or (seek_xueli<>"选择")) then
'<!--在前面输入了人名或选择了学历-->
sql_zhicheng=" and zc ='" &seek_zhicheng&
"'"
else
sql_zhicheng=" zc ='" &
seek_zhicheng&"'"
end if
sql_text=sql_text &
sql_zhicheng
end if
'<!--查看是否选择了现在状况-->
if seek_zhuangkuang="选择" then
'<!--如果没有选择现在状况-->
sql_text=sql_text
else
if ((seek_name<>"") or (seek_xueli<>"选择") or (seek_zhicheng<>"选择")) then
'<!--在前面输入了人名或选择了学历或选择了职称-->
sql_zhuangkuang=" and zk ='" &seek_zhuangkuang&
"'"
else
sql_zhuangkuang= " zk = '" &
seek_zhuangkuang&
"'"
end if
sql_text=sql_text &
sql_zhuangkuang
end if %>
<% Set rs=Server.CreateObject("ADODB.Recordset")
rs.open sql_text,conn,1,1
if isempty(pageno) or cint(pageno)<1 or cint(pageno)>mpage then
pageno=1
end if
rs.absolutepage=pageno
%>
<%
rs.pagesize=8
mpage=rs.pagecount
rc=rs.pagesize
re=1
do while not rs.eof
name=rs("name")
xl=rs("xl")
zc=rs("zc")
zk=rs("zk")
%>
</p>
<table width="467" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="69" valign="top" width="117" bgcolor="#e1e1e1">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="117" height="67">
<div align="center"><font color="#000000">姓名:</font></div>
</td>
</tr>
</table>
</td>
<td valign="top" width="116">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="116" height="67">
<div align="center"> <%=name%> </div>
</td>
</tr>
</table>
</td>
<td width="118" valign="top" bgcolor="#e1e1e1">
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#000033" bgcolor="#CC0000">
<tr>
<td width="119" height="67">
<div align="center">学历:</div>
</td>
</tr>
</table>
</td>
<td width="1"></td>
<td width="115" valign="top">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="256" height="67">
<div align="center"> <%=xl%> </div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="69" valign="top" bgcolor="#e1e1e1">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="117" height="69">
<div align="center"><font color="#000000">职称:</font></div>
</td>
</tr>
</table>
</td>
<td valign="top">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="116" height="69">
<div align="center"> <%=zc%> </div>
</td>
</tr>
</table>
</td>
<td valign="top" bgcolor="#e1e1e1" colspan="2">
<table width="99%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="118" height="69">
<div align="center">状况:</div>
</td>
</tr>
</table>
</td>
<td valign="top">
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="256" height="67">
<div align="center"> <%=zk%> </div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="0"></td>
<td></td>
<td bgcolor="#e1e1e1"></td>
<td bgcolor="#e1e1e1"></td>
<td></td>
</tr>
</table>
<table width="468" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="468" height="49" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="468" height="49" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="468" height="58" valign="top">
<div align="center">
<p>&nbsp;</p>
<p align="left">
<%
rs.movenext
loop%>
</p>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="694" border="0" cellspacing="0" cellpadding="2" align="center" height="25" bgcolor="F2F2F2">
<tr>
<td width="226"></td>
<td align="center" width="240"> </td>
<td width="330" align="right">[
<% for pno=1 to mpage
if pno=cint(pageno) then
%>
<%=pno%>
</font><%else
%>
<b><a href='people_seek1.asp?pageno=<%=pno%>&txt_name=<%=seek_name%>&sel_xueli=<%=seek_xueli%>&sel_zhicheng=<%=seek_zhicheng%>&sel_zhuangkuang=<%=seek_zhuangkuang%>'><%=pno%></a></b>
<%end if%>
<%next%>
]</td>
</tr>
</table>
<p>&nbsp;</p>
</body>
</html>