28,409
社区成员




<%'上面是查询
allcount=rsl.recordcount
IF allcount mod 20 <>0 THEN
S=INT(ALL/20+1)
ELSE
S=ALL/20
END IF%>
<%
m=1
n=20
FOR i=1 TO S%>
<div id=page<%=i%>>
<table>
<tr><td>表头</td></tr>
<%Set rs = Server.CreateObject ("ADODB.Recordset")
if n=20 then
sqll="select top "&ss&" * from [u_mains] where"
else
sqll="select top "&ss&" * from [u_mains] where id not in (select top "&sss&" id from u_mains order by id asc) and"
end if
if s_pc="1" then sqll=sqll&" u_pc='"&i_pc&"' and"
if s_rq="1" then sqll=sqll&" u_date between #"&InTime1&"# and #"&InTime2&"# and"
if s_cx="1" then sqll=sqll&" u_cx='"&i_cx&"' and"
if s_name="1" then sqll=sqll&" u_name='"&i_name&"' and"
if s_sex="1" then sqll=sqll&" u_sex='"&i_sex&"' and"
if s_card="1" then sqll=sqll&" u_card='"&i_card&"' and"
if s_tel="1" then sqll=sqll&" u_tel='"&i_tel&"' and"
if s_address="1" then sqll=sqll&" u_address like '%"&i_address&"%' and"
if right(sqll,5)="where" then sqll=left(sqll,clng(len(sqll))-5) ''''解决所有参数都为空的情况
if right(sqll,3)="and" then sqll=left(sqll,clng(len(sqll))-3) ''''去掉参数最后的and
sqll=sqll&" order by id asc"
response.Write(""&sqll&"")
rs.Open sqll,conn,1,1
if rs.EOF and rs.BOF then
Response.Write "暂时还没有内容"
else
page_count=m
do while not rs.eof%>
<tr><td>显示内容</td></tr>
<%page_count=page_count+1
rs.MoveNext
Loop
end if%>
</table>
</div>
<%N=N+20
M=M+20%>
<%NEXT%>
<%'上面是查询
allcount=rsl.recordcount
IF allcount mod 20 <>0 THEN
S=INT(ALL/20+1)
ELSE
S=ALL/20
END IF%>
<%'上面是查询
allcount=rsl.recordcount
IF allcount mod 20 <>0 THEN
S=INT(ALL/20+1)
ELSE
S=ALL/20
END IF%>