菜单查询结果如何分页
前边是全部的分页内容,后边的产品分类是后来加上去的菜单选项,点菜单里的选项,上边的分页内容就会根据选项对应改变,菜单的script语句怎么写哪位知道啊?
<form name= "form1 " method= "post " style= "text-align: center ">
<%
sql= "SELECT * FROM pro ORDER BY pid asc "
set rscyc=server.CreateObject( "adodb.recordset ")
rscyc.open sql,conn,1,1
i=0
if rscyc.eof then
response.write( "没有记录!! ")
else
rscyc.pagesize=20
if request( "page ")= " " then
session( "page ")=1
else
session( "page ")=eval(session( "page ") & request( "page "))
if session( "page ") <1 then
session( "page ")=1
end if
if session( "page ")> rscyc.PageCount then
session( "page ")=rscyc.PageCount
end if
end if
rscyc.AbsolutePage=session( "page ")
j=0
do while not rscyc.eof and j <rscyc.pagesize
j=j+1
i=rscyc.pagesize*(session( "page ")-1)+j
%> <tr>
<td> <%=Server.HtmlEncode(rscyc( "pid "))%> </td>
<td > <%=Server.HtmlEncode(rscyc( "pnumber "))%> </td>
<td > <%=Server.HtmlEncode(rscyc( "ptypename "))%> > </td>
<td > <%=Server.HtmlEncode(rscyc( "ppic "))%> </font> </td>
<td > </td>
<td > </td>
<td > </td>
</tr>
<%
rscyc.movenext
loop
%>
</table> <table >
<tr>
<td> <div align= "center "> <font size= "-1 "> 总记录数 <%=rscyc.recordcount%> </font> <font size= "-1 "> 当前页 <%=session( "page ")%> /总页数 <font color= "#FF0000 "> <%=rscyc.pagecount%> </font>
<%if session( "page ")> 1 then%>
<a href= "proshow.asp?page=-1&Person_bm_id= <%=request( "Person_bm_id ")%> "> 上一页 </a>
<%else%>
上一页
<%end if%>