高分求看看下面这段分页代码?急!在线等?
果果 2003-09-26 08:35:30 二个表:类别表和物品表
类别表中:id |assortid| assortname
物品表中:id| goodsname| price| assortid
类别表中的类别全部显示出来之后,我想点击其中的一个类别会显示属于此类别的所有物品,但是当物品太多的时候怎么实现分页显示.???
<%
Dim t
t="玩具"
t=" where assortname='"&t&"'"
Set rs = conn.Execute ("SELECT * FROM 类别表"&t)
If rs.EOF Or rs.BOF Then
Response.Write "此类别新闻不存在!"
else
i=0
response.write "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"
do while not rs.eof
assortid=rs("assortid")
assortname=rs("assortname")
strNews=" and Assortid=" & Assortid
if i mod 2 =0 then response.write "<tr>"
response.write"<td valign=""top"">"
response.write"<table border=""0"" width=""100%"" cellpadding=""1"" cellspacing=""2"" align=""center"">"
response.write"<tr> "
response.write"<td bgcolor=""#ffffff"" height=""18"" valign=""top"">"
Set rs1 = conn.Execute ("SELECT id,goodsname,price FROM 物品表where " & strNews
If rs1.EOF Or rs1.BOF Then
Response.Write "对不起,暂时还没有此类物品!"
else
do while not rs1.eof
response.write rs("goodsname")&rs("price")
rs1.MoveNext
Loop
end if
rs1.close
set rs1=nothing
response.write "</td></tr></table></td>"
i=i+1
if i mod 2 =0 then response.write "</tr>"
rs.MoveNext
Loop
end if
response.write "</table>"
%>