![]() |
#2
皮皮哎淘淘2013-06-14 14:36
|
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录
数据库产品分类表
只有本站会员才能查看附件,请 登录

<%
sql = ""
sqlc = ""
isAdd = 1
content = ""
lm = ""
if parentid <> "" then
sql = "select * from producttype where id = "&parentid
sqlc = "select * from producttype where lmid = '"&parentid&"'"
else
if id <> "" then
sql = "select * from producttype where id = "&id
sqlc = "select * from producttype where lmid = '"&id&"'"
else
sql = ""
sqlc = ""
end if
end if
if sql = "" then
lm = "设计案例"
linkUrl = "case_list.asp"
else
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
if not rs.eof then
isAdd = rs("isAdd")
lm = rs("lm")
content = rs("content")
linkUrl = ""
if rs("linkUrl") is null or rs("linkUrl") = "" then
linkUrl = "case_list.asp?id="&rs("id")
end if
end if
rs.close
set rs = nothing
end if
%>
<div class="caseboxList">
<% if isAdd = 1 then %>
<ul class="caseboxListPro">
<%
if id <> "" then
sql = "select * from products where lm = "&id&" order by sortid,bookid desc"
else
sql = "select * from products order by sortid,bookid desc"
end if
%>
response.write(sql)结果是select * from products order by sortid,bookid desc,求高手指点 sql = ""
sqlc = ""
isAdd = 1
content = ""
lm = ""
if parentid <> "" then
sql = "select * from producttype where id = "&parentid
sqlc = "select * from producttype where lmid = '"&parentid&"'"
else
if id <> "" then
sql = "select * from producttype where id = "&id
sqlc = "select * from producttype where lmid = '"&id&"'"
else
sql = ""
sqlc = ""
end if
end if
if sql = "" then
lm = "设计案例"
linkUrl = "case_list.asp"
else
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
if not rs.eof then
isAdd = rs("isAdd")
lm = rs("lm")
content = rs("content")
linkUrl = ""
if rs("linkUrl") is null or rs("linkUrl") = "" then
linkUrl = "case_list.asp?id="&rs("id")
end if
end if
rs.close
set rs = nothing
end if
%>
<div class="caseboxList">
<% if isAdd = 1 then %>
<ul class="caseboxListPro">
<%
if id <> "" then
sql = "select * from products where lm = "&id&" order by sortid,bookid desc"
else
sql = "select * from products order by sortid,bookid desc"
end if
%>