你为什么不把公司关键字作为参数代到要显示产品的页面呢
专注于WEB前端交互平台开发:[url=http://blog./]blog.[/url](富客户端技术(RIA)交流平台)
这就是有获取公司的的代码,那该如何才能获取某家公司的所有产品??
<body leftmargin="0" topmargin="0">
<p>
<table width="260" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
<tr class="topbg">
<td colspan="8"><table width="100%" height="172" border="0" cellpadding="0" cellspacing="1">
<%
set rs=server.createobject("adodb.recordset")
dim sql
sql="select * from baojianpin order by date DESC"
if request.QueryString("type")<>"" then
sql="select * from baojianpin order by date DESC"
end if
page=request.querystring("page")
if page="" then page=1
if not(isnumeric(page)) then page=1
if page<1 then page=1
page=int(page)
rs.open sql,conn,3,1
if rs.eof then
%>
<tr>
<td height="24" colspan="2">
<div align="center"><font color="#FF0000" size="3">暂时没有记录!</font></div> </td>
</tr>
<%
response.end
else
rs.pagesize=12
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page
i=0
dim id(),gongsi(),tupian()
do while not rs.eof and (i<rs.pagesize)
i=i+1
redim preserve id(i),gongsi(i),tupian(i)
id(i)=rs("id")
gongsi(i)=rs("gongsi")
tupian(i)=rs("tupian")
rs.movenext
loop
end if
rs.close
%>
<tr>
<%for i = 1 to ubound(id)%>
<td HEIGHT="140">
<a href="baojianpinxx.asp?id=<%=id(i)%>" target="_blank">
<img border="1" src="
<%
if trim(tupian(i))="" then
response.Write("images/none.jpg")
else
response.Write(trim(tupian(i)))
end if
%>
" width="100" height="100"></a><br><div align="center" class="STYLE4"><br>
<%=left(gongsi(i),8)%></div></td>
<td HEIGHT="140">
<iframe border="0" frameborder="0" noresize scrolling="no" width="160" height="120"
src="../baojianpin/chanpin_list1.asp"></iframe>
</td>
<%a=a+1%>
<%if a>2 then %>
</tr>
<tr>
<%a=0%>
<%end if%>
<%next%>
</tr>
</table></td>
</tr>
</table>
<p>
<%
set rs=nothing
conn.close
set conn=nothing
%>
</p>
</p>
</body>
[此贴子已经被作者于2007-3-30 9:43:40编辑过]