[求助]横向循环问题
<table width="584" border="0" align="center" cellpadding="0" cellspacing="0" ><tr align="center">
<%
sql2="select top 8 * from [user] order by USERid desc"
Set rss=Server.CreateObject("ADODB.Recordset")
rss.Open sql2,conn2,1,1
if rss.eof and rss.bof then
response.Write "<font color='ff0000'>还没有记录呢!!</font>"
else
do while not rss.eof
%> <td width="73"><img src="Reporter/<%=rss("PhotoDir")%>" width="67" height="67"></td>
</tr>
<tr align="center">
<td bgcolor="FFCC66"><%=rss("UserName")%></td>
</tr>
<%
if rss.eof then
exit do
else
rss.movenext
end if
loop
end if
%>
</table>
这样显示的结果是4行1列,但是我想要的结果是1行4列,所以我用了一个最土的方法把行合并,只在td循环
<table width="584" border="0" align="center" cellpadding="0" cellspacing="0" >
<tr align="center">
<%
sql2="select top 8 * from [user] order by USERid desc"
Set rss=Server.CreateObject("ADODB.Recordset")
rss.Open sql2,conn2,1,1
if rss.eof and rss.bof then
response.Write "<font color='ff0000'>还没有记录呢!!</font>"
else
do while not rss.eof
%>
<td width="73"><img src="Reporter/<%=rss("PhotoDir")%>" width="67" height="67"><br><%=rss("UserName")%></td>
<%
if rss.eof then
exit do
else
rss.movenext
end if
loop
end if
%>
</tr>
</table>
但是如果tr较多或不能合并的话那怎么办呢?你们有没有高级一点方法,求助。。。