<!--PRO Begin-->
<%sql="select * from products"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write("Null")
else
rdcount=rs.recordcount
%>
<TABLE cellSpacing=0 cellPadding=0 width=190 border=0>
<TBODY>
<TR>
<%
dim tempstr
tempstr = -1
for i=1 to rdcount
if rs("type_id") <> tempstr then
tempstr = rs("type_id")
%>
<TD width=163>
<DIV align=center>
<TABLE cellSpacing=0 cellPadding=0 width="170" border=0>
<TBODY>
<TR>
<TD height=120 align="center"><A href="prod.asp?product_id=<%=rs("product_id")%>&type_id=<%=replace(rs("type_id"),"&","_")%>"><%=rs("type_id")%></A>
<P align=center><A href="prod.asp?product_id=<%=rs("product_id")%>&type_id=<%=replace(rs("type_id"),"&","_")%>"><IMG src="images/<%=rs("product_photo")%>" border=0 width=100></A></P></TD></TR>
<TR>
<TD height=25>
<P align=center><A class=small href="prod.asp?product_id=<%=rs("product_id")%>&type_id=<%=replace(rs("type_id"),"&","_")%>">
<span style="font-size: 8pt; text-decoration: none"><%=rs("product_num")%></span></A></P></TD></TR>
<TR>
<TD> <TR>
<TD>
<table border="0" width=150 cellspacing="0" cellpadding="0" align=center>
<tr>
<td bgcolor="#000000" height=1></td>
</tr>
</table></TD>
</TR>
<TR>
<TD height=10></TD>
</TR><%
sql="select top 5 * from products where type_id='"&type_id&"' and product_id<>"&rs("product_id")&" order by product_date desc"
rs2.open sql,conn,1,1
rdcount2=rs2.recordcount
for j=1 to rdcount2
%>
<TR>
<TD height=20><IMG style="margin-left:10px" src="images/arrow_blk.gif" border=0><A class=navsublinks
href="prod_detail.asp?product_id=<%=rs2("product_id")%>&type_id=<%=replace(rs2("type_id"),"&","_")%>"><%=rs2("product_num")%></A></TD>
</TR>
<%
rs2.movenext
next
rs2.close
%>
<TR>
<TD height=20><IMG style="margin-left:10px" src="images/arrow_blk.gif" border=0><A href="prod.asp?product_id=<%=rs("product_id")%>&type_id=<%=replace(rs("type_id"),"&","_")%>"><img src="images/view_all.gif" border=0></A></TD>
</TR>
</TD></TR>
</TBODY></TABLE></DIV></TD>
<TD width=27 valign="top">
<table border="0" width="1" id="table1" cellspacing="0" cellpadding="0" bgcolor="#000000" height=140 align=center>
<tr>
<td bgcolor="#FFFFFF" width=1 height="7"></td>
</tr>
<tr>
<td></td>
</tr>
</table>
</TD>
<%
end if
rs.movenext
if i mod 3 = 0 then response.write("</tr><tr><td height=30></td></tr><TR>")
next
end if
rs.close
%>
</TR>
</TBODY></TABLE>
<!--PRO End-->
现在这个页面如果同一个type_id的记录条数大于1,那么就会换行显示下一个type_id的内容
请问这一句if i mod 3 = 0 then response.write("</tr><tr><td height=30></td></tr><TR>")
如何调整,能够显示满3个type_id才换行
谢谢