下面我用的这段代码是把图片排成10行1列,谁能帮我改成图片2行5列
小弟ASP不熟.感谢,请加我qq: ***********
<%
Set Rs = server.CreateObject("adodb.recordset")
sql="select top 10 a.BizId,a.BuyClass,a.DateAndTime,a.ProductName,a.ProductPic from BizTbl a,UserTbl b where b.UserPower=5 and b.UserName=a.UserName and a.ProductPic<>'' and a.PicHot=1 order by a.BizId desc"
Rs.open sql, conn, 1, 1
If Not(Rs.bof and Rs.EOF) Then
do while not rs.eof
%>
<a href="abc.asp?id=<%=rs(0)%>"><img src="<%=rs(4)%>" width="85" height="80" border="0"></a>
<%rs.movenext
loop
end if
rs.close:set rs=nothing
%>
參考答案:<%
Set Rs = server.CreateObject("adodb.recordset")
sql="select top 10 a.BizId,a.BuyClass,a.DateAndTime,a.ProductName,a.ProductPic from BizTbl a,UserTbl b where b.UserPower=5 and b.UserName=a.UserName and a.ProductPic<>'' and a.PicHot=1 order by a.BizId desc"
Rs.open sql, conn, 1, 1
If Not(Rs.bof and Rs.EOF) Then
i=1
do while not rs.eof
%>
<a href="abc.asp?id=<%=rs(0)%>"><img src="<%=rs(4)%>" width="85" height="80" border="0"></a>
<%
if i mod 5=0 then
response.write("<br>")
end if
rs.movenext
i=i+1
loop
end if
rs.close
set rs=nothing
%>