ASP表格循环代码
我这个代码想让商品列表变成2列的,怎么修改呢?请高手帮助<%
set rs=server.createobject("adodb.recordset")
if bid="" then
sql="select * from pic order by id desc"
end if
if bid<>"" and sid="" then
sql="select * from pic where bigclassname='"&rsb("bigclassname")&"' order by id desc"
end if
if bid<>"" and sid<>"" then
sql="select * from pic where bigclassname='"&rsb("bigclassname")&"' and smallclassname='"&rss("smallclassname")&"' order by id desc"
end if
rs.open sql,conn,1,1
if rs.eof then
Response.Write "<br><center>没有产品信息</center>"
else
counts=10
rs.pagesize=counts
allpages=rs.pagecount
page=request("page")
if not isnumeric(page) then page=1
if isempty(page) or cint(page)<1 then
page=1
elseif cint(page)>=allpages then
page=allpages
end if
rs.absolutepage=page
end if
do while (not rs.eof) and counts>0
%>
<TABLE
style="BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; FLOAT: left; MARGIN: 5px 12px; BORDER-LEFT: #cccccc 1px solid; BORDER-BOTTOM: #cccccc 1px solid"
height=150 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD class=pl23 align=middle width=160 rowSpan=2><A
href="showproduct.asp?id=<%=rs("id")%>"><IMG
height=120 src="<%=rs("photo")%>"
width=150 border=0></A></TD>
<TD class=pla2
style="PADDING-LEFT: 10px; FONT-SIZE: 12px; TEXT-ALIGN: left"
height=40><A
style="FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #333333"
href="showproduct.asp?id=<%=rs("id")%>"><%=rs("title")%></A></TD>
</TR>
<TR>
<TD class=pl1a
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; FONT-SIZE: 12px; PADDING-BOTTOM: 10px; LINE-HEIGHT: 22px; PADDING-TOP: 10px"
vAlign=top align=left><%=CutStrX(rs("content"),220)%></TD>
</TR>
</TBODY>
</TABLE>
<%
counts=counts-1
rs.movenext
if rs.eof then exit do
loop
%>