aab的四字词语大全集:ASP告急,如何做这这样的分页

来源:百度文库 编辑:高考问答 时间:2024/04/29 01:44:24
SQL语句:
set rs_Product=server.createobject("adodb.recordset")
sqltext="select * from Product where Passed=True and SpecialName='代理销售产品' order by UpdateTime desc"
rs_Product.open sqltext,conn,1,1
分页程序:
<%
if NoncePage>1 then
response.write "|<a href=ProductSupply.asp?page=1>首 页</a>| |<a href=ProductSupply.asp?page="&NoncePage-1&">上一页</a>| "
else
response.write "|首 页| |上一页| "
end if
if Cint(Trim(NoncePage))<Cint(Trim(NumPage)) then
response.write "|<a href=ProductSupply.asp?page="&NoncePage+1&">下一页</a>| |<a href=ProductSupply.asp?page="&NumPage&">尾 页</a>|"
else
response.write "|下一页| |尾 页|"
end if
%>
 页次:<font color="#0033CC"><%=NoncePage%></font>/<font color="#0033CC"><%=NumPage%></font>
共<font color="#0033CC"><%=NumRecord%></font>条记录 
怎么把SQL语句里的两个固定的条件加在分页程序里面,条件是固定的,跪求解答!

sqltext="select * from Product where Passed=True and SpecialName='代理销售产品' order by UpdateTime desc"

这句的where后面可以加上条件

如sqltext="select * from Product where 1=1 and 2=2 and Passed=True and SpecialName='代理销售产品' order by UpdateTime desc"

请说的更明白一点,说明你要实现什么功能需要把SQL语句里的两个固定的条件加在分页程序里面

你是说想看哪一页就rs中只包含该页的记录而没有上一页和下一页的记录吗?