[求助]信息显示问题
为什么我加入这个oblog_user表后,要显示这个 <%=blogname(i)%>字段时会有四个相同的信息同时出现??不加时相同的信息都是显示一个的.红色的是这个表和字段,帮看看,谢谢~~
<%
set rs=server.createobject("adodb.recordset")
page=request("page")
if page="" then page=1
if not(isnumeric(page)) then page=1
if page<1 then page=1
page=int(page)
sql="select * from zhaoshang,oblog_user order by date DESC"
rs.open sql,conn,3,1
if rs.eof then
%>
<tr bgcolor="#EEEEEE">
<td height="24" colspan="2" bgcolor="#FFFFFF">
<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(),userid(),yaopinmingcheng(),tupian(),pizhunwenhao(),yaopinleibie(),zhaoshangquyu(),blogname()
do while not rs.eof and (i<rs.pagesize)
i=i+1
redim preserve id(i),userid(i),yaopinmingcheng(i),tupian(i),pizhunwenhao(i),yaopinleibie(i),zhaoshangquyu(i),blogname(i)
id(i)=rs("id")
yaopinmingcheng(i)=rs("yaopinmingcheng")
tupian(i)=rs("tupian")
pizhunwenhao(i)=rs("pizhunwenhao")
yaopinleibie(i)=rs("yaopinleibie")
zhaoshangquyu(i)=rs("zhaoshangquyu")
blogname(i)=rs("blogname")
rs.movenext
loop
end if
rs.close
%>
<tr>
<%for i = 1 to ubound(id)%>
<td width="13%" HEIGHT="132" align="center" valign="middle" bgcolor="#ffffff">
<div align="center"> <a href="cpzs_list.asp?id=<%=id(i)%>" target="_blank"> </a>
<table width="98" height="116" border="1" cellpadding="1" cellspacing="1">
<tr>
<td width="102" bgcolor="#FFFFFF"><a href="zhaoshangxx.asp?id=<%=id(i)%>" target="_blank">
<img border="0" src="
<%
if trim(tupian(i))="" then
response.Write("images/no.jpg")
else
response.Write(trim(tupian(i)))
end if
%>
" width="92" height="112"></a></td>
</tr>
</table>
</div>
</td>
<td width="33%" HEIGHT="132" align="left" bgcolor="#FFFFFF" class="text">
<span class="STYLE3">药品名称: <%=yaopinmingcheng(i)%></span><br><br>
<span class="STYLE3">批准文号: <%=pizhunwenhao(i)%></span><br><br>
<span class="STYLE3">药品类别:
<%
set rs1=server.createobject("adodb.recordset")
sql1="select * from fengyanna where ID="&yaopinleibie(i)
rs1.open sql1,conn,1,1
if not rs1.eof then
producttype=rs1("small")
end if
%>
<%=producttype%>
</span>
</td>
<td width="37%">
<span class="STYLE3"><%=blogname(i)%>
<br>
<br>
招商区域:<%=zhaoshangquyu(i)%>
<br>
<br>
</span>
</td>
<td width="17%" align="right" valign="top"><br>
<img name="aa" src="" width="48" height="77" alt="">
<br>
<span class="STYLE3">我要代理</span>
</td>
<%a=a+1%>
<%if a>0 then %>
</tr>
<tr>
<%a=0%>
<%end if%>
<%next%>
</tr>
<tr align="center" valign="middle" bgcolor="#EFEFEF">
<td height="18" COLSPAN="6" align="center" valign="middle" bgcolor="#FFFFFF">
<form method=Post action="zhaoshang.asp">
<p align="center" class="STYLE3"> 共<%=totalpage%>页 第<%=page%>页
<%if page-1>0 then%>
<a href="zhaoshang.asp?page=<%=page-1%>">上一页</a>
<%else%>
上一页
<%end if%>
<%if page+1<=totalpage then%>
<a href="zhaoshang.asp?page=<%=page+1%>">下一页</a>
<%else%>
下一页
<%end if%>
<%
response.write " 转到:<input type='text' name='page' size=4 maxlength=10 value="&page&">"
response.write " <input type='submit' value=' Goto ' name='cndok'></span></p>"
%></p>
</form>
</td>
</tr>
</table>
<table width="780" height="100" border="0" cellpadding="0" cellspacing="1">
<tr>
<td bgcolor="#6699FF">
<div align="center">广告
</div></td>
</tr>
</table>
</div>
<%
set rs=nothing
conn.close
set conn=nothing
%>
[此贴子已经被作者于2007-3-15 15:56:39编辑过]