ASP+MYSQL 分页显示

来源:百度知道 编辑:UC知道 时间:2024/05/03 07:07:42
我的联系方式是:QQ278481023
谁能帮我 我把积分全部贡献出来给他!
谢谢!

<% Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
if not rs.eof then
page = Trim(Request("pn"))
if page = "" then page = 1
if isnull(page) then page = 1
if isempty(page) then page = 1
if not isnumeric(page) then page = 1
if len(page) > 8 then page = 1
page = Clng(page)
rs.PageSize = 22
if page < 1 then page = 1
if page > rs.pagecount then page = rs.pagecount
rs.absolutepage = page
cc = 0
while not rs.eof and cc < rs.pageSize
cc = cc + 1
%>
<span><%=rs("productName")%></span>
<%
rs.movenext
wend
end if
%>