level 1
zhiyaows163
楼主
<%
Bigclassname=Request("Bigclassname")
Smallclassname=Request("Smallclassname")
set rs=server.createobject("adodb.recordset")
if Request("Bigclassname")="" then
sql="select top 700 * from product order by proID"
end if
if Request("Bigclassname")<>"" and request("smallclassanme")=""then
sql="select * from product where bigclassname='"&Bigclassname&"' order by proID "
end if
if Request("Bigclassname")<>"" and request("smallclassname")<>"" then
sql="select * from product where bigclassname='"&Bigclassname&"' and Smallclassname ='"&smallclassname&"'order by proID desc"
end if
rs.open sql,conn,1,1
if request("page")="" then
page=1
else
page=cint(request("page"))
end if
rs.pagesize=10
rs.absolutepage=page
url="Pro1.asp?BigClassName="&BigClassName&"&SmallClassName="&SmallClassName&"&page="
%>
<%
if rs.Eof and rs.Bof then
Response.Write "暂无数据!"
else
%>
这是show.asp中代码,Accss数据库中有大类1,2,对应小类11,22。我需要个超链接打开show.asp的时候显示大类1,小类11中的所有产品,不显示2,22的。这个超链代码应该如何写。
2014年12月19日 07点12分
1
Bigclassname=Request("Bigclassname")
Smallclassname=Request("Smallclassname")
set rs=server.createobject("adodb.recordset")
if Request("Bigclassname")="" then
sql="select top 700 * from product order by proID"
end if
if Request("Bigclassname")<>"" and request("smallclassanme")=""then
sql="select * from product where bigclassname='"&Bigclassname&"' order by proID "
end if
if Request("Bigclassname")<>"" and request("smallclassname")<>"" then
sql="select * from product where bigclassname='"&Bigclassname&"' and Smallclassname ='"&smallclassname&"'order by proID desc"
end if
rs.open sql,conn,1,1
if request("page")="" then
page=1
else
page=cint(request("page"))
end if
rs.pagesize=10
rs.absolutepage=page
url="Pro1.asp?BigClassName="&BigClassName&"&SmallClassName="&SmallClassName&"&page="
%>
<%
if rs.Eof and rs.Bof then
Response.Write "暂无数据!"
else
%>
这是show.asp中代码,Accss数据库中有大类1,2,对应小类11,22。我需要个超链接打开show.asp的时候显示大类1,小类11中的所有产品,不显示2,22的。这个超链代码应该如何写。