3 回答
TA贡献1878条经验 获得超4个赞
Response.Write "<a href=../product.asp?bcid="& bcid &"&title="& bcname &">"& bcname &"</a> "
下面这句我看不清你的引号,
SELECT * from SmallClass where BigClassID="&bcid&" and SmallClassID<>''"
但我觉得你可以这样写
SELECT * from SmallClass where BigClassID="&bcid&" and isNull(SmallClassID)"
TA贡献1797条经验 获得超6个赞
<%
set rs1=server.createobject("adodb.recordset")
sql1 = "SELECT * from BigClass"
rs1.open sql1,conn,1,1
do while not rs1.EOF '大类未结束时循环
bcid = rs1("BigClassID")
bcname = rs1("BigClassName")
Response.Write "<li> <h3 class='mcate-item-hd'>"
Response.Write "<span> "
Response.Write "<a href=../product.asp?bcid='"&bcid&"' title='"&bcname&"' > '"&bcname&"' </a> "
Response.Write "</span></h3></li>"
set rs2=server.createobject("adodb.recordset")
sql2 = "SELECT * from SmallClass where BigClassID="&bcid&" and SmallClassID<>"" "
rs2.open sql2,conn,1,1
do while not rs2.EOF '小类未结束时循环
scid = rs2("SmallClassID")
scname = rs2("SmallClassName")
Response.Write "<p class='mcate-item-bd'> "
Response.Write "<a href=../product.asp?bcid='"&bcid&"'&scid='"&scid&"' title='"&scname& "'>'"&scname&"'</a> </p>"
rs2.MoveNext
loop
rs2.close
set rs2=nothing
rs1.MoveNext
loop
rs1.close
set rs1=nothing
%>
TA贡献1895条经验 获得超7个赞
Response.Write "<a href=../product.asp?bcid='"&bcid&"' title='"&bcname&"' > '"&bcname&"' </a> "
其中没有必要用单引号的地方别乱用。
- 3 回答
- 0 关注
- 203 浏览
添加回答
举报