ASP 调用指定分类文章怎么修改代码?那个ID=?应该天加在哪里?
<td><%dimproPic,c_idsii=0sql="select*fromP_productwhere1=1"ifcint(sc_id)>0thenc_ids=G...
<td > <%
dim proPic,c_ids
ii=0
sql="select * from P_product where 1=1 "
if cint(sc_id)>0 then
c_ids=GetRelatedID(sc_id)
sql=sql&"and C_ID in("&c_ids&")"
end if
skey=replace(skey," Enter Product Keyword # ","")
if skey<>"" then
sql=sql&" and (P_Name like '%"&skey&"%' or P_Instr like '%"&skey&"%')"
end if
sql=sql&" order by orderId desc,P_ID desc"
rs.open sql,conn,1,1
if rs.eof then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100">
<tr>
<td align="center">没有发现产品……</td>
</tr>
</table>
<%
else
ps=10
rs.pagesize=ps
currentpage=request("page")
if currentpage="" then currentpage=1
if currentpage<1 then currentpage=1
if cint(currentpage)>cint(rs.pagecount) then currentpage=rs.pagecount
rs.absolutepage=currentpage
p_count=rs.pagecount
n_count=rs.recordcount
%> <marquee scrollAmount=3 scrollDelay=2 onmouseover=this.stop() onmouseout=this.start()><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<%
ii=0
do while not rs.eof
proPic=rs("P_sPic")
if proPic="" or isnull(proPic) then proPic=rs("P_Pic")
ii=ii+1
%>
<td > <table width="229" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="169"><div align="center"><a href="productshow.asp?P_ID=<%=rs("P_ID")%>" target="_blank"><img src="../<%=mid(proPic,4)%>" width="210" height="157" border="0" /></a></div></td>
</tr>
<tr>
<td height="18" class="STYLE2"><div align="center"><a class="p9" href="productshow.asp?P_ID=<%=rs("P_ID")%>"><%=rs("P_Name")%></a></div></td>
</tr>
</table></td>
<%
If cint(ii)>=cint(ps) Then Exit Do
rs.movenext
loop
rs.close
set rs=nothing
%>
</tr>
</table></marquee>
<%end if%></td> 展开
dim proPic,c_ids
ii=0
sql="select * from P_product where 1=1 "
if cint(sc_id)>0 then
c_ids=GetRelatedID(sc_id)
sql=sql&"and C_ID in("&c_ids&")"
end if
skey=replace(skey," Enter Product Keyword # ","")
if skey<>"" then
sql=sql&" and (P_Name like '%"&skey&"%' or P_Instr like '%"&skey&"%')"
end if
sql=sql&" order by orderId desc,P_ID desc"
rs.open sql,conn,1,1
if rs.eof then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100">
<tr>
<td align="center">没有发现产品……</td>
</tr>
</table>
<%
else
ps=10
rs.pagesize=ps
currentpage=request("page")
if currentpage="" then currentpage=1
if currentpage<1 then currentpage=1
if cint(currentpage)>cint(rs.pagecount) then currentpage=rs.pagecount
rs.absolutepage=currentpage
p_count=rs.pagecount
n_count=rs.recordcount
%> <marquee scrollAmount=3 scrollDelay=2 onmouseover=this.stop() onmouseout=this.start()><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<%
ii=0
do while not rs.eof
proPic=rs("P_sPic")
if proPic="" or isnull(proPic) then proPic=rs("P_Pic")
ii=ii+1
%>
<td > <table width="229" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="169"><div align="center"><a href="productshow.asp?P_ID=<%=rs("P_ID")%>" target="_blank"><img src="../<%=mid(proPic,4)%>" width="210" height="157" border="0" /></a></div></td>
</tr>
<tr>
<td height="18" class="STYLE2"><div align="center"><a class="p9" href="productshow.asp?P_ID=<%=rs("P_ID")%>"><%=rs("P_Name")%></a></div></td>
</tr>
</table></td>
<%
If cint(ii)>=cint(ps) Then Exit Do
rs.movenext
loop
rs.close
set rs=nothing
%>
</tr>
</table></marquee>
<%end if%></td> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询