asp多行显示数据库图片(以下代码显示两行,求改成三行)
<tablewidth="98%"border="0"cellpadding="0"cellspacing="0"><%setrs_Product=server.crea...
<table width="98%" border="0" cellpadding="0" cellspacing="0">
<%
set rs_Product=server.createobject("adodb.recordset")
sqltext="select top " & Product_count & " * from Product where Passed=True order by UpdateTime desc"
rs_Product.open sqltext,conn,1,1
%>
<tr align="center">
<%
If rs_Product.eof and rs_Product.bof then
response.write "<td><p align='center'><font color='#ff0000'>还没任何产品</font></p></td>"
else
row_count=1
Do While Not rs_Product.EOF%>
<td><table height="97" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="175" height="145" align="center" valign="middle"><a href="ProductShow.asp?ID=<%=rs_Product("id")%>"><img src=<%=rs_Product("DefaultPicUrl")%> width="155" height="125" border=0 ></a></td>
</tr>
<tr>
<td height="40" colspan="2" align="center"><a href="Product_Show.asp?ID=<%=rs_Product("id")%>"><%=rs_Product("Title")%></a></td>
</tr>
</table></td>
<% if row_count mod 4 =0 then%>
</tr>
<tr>
<%end if%>
<%
rs_Product.MoveNext
row_count=row_count+1
Loop
end if
rs_Product.close
%>
</tr>
</table> 展开
<%
set rs_Product=server.createobject("adodb.recordset")
sqltext="select top " & Product_count & " * from Product where Passed=True order by UpdateTime desc"
rs_Product.open sqltext,conn,1,1
%>
<tr align="center">
<%
If rs_Product.eof and rs_Product.bof then
response.write "<td><p align='center'><font color='#ff0000'>还没任何产品</font></p></td>"
else
row_count=1
Do While Not rs_Product.EOF%>
<td><table height="97" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="175" height="145" align="center" valign="middle"><a href="ProductShow.asp?ID=<%=rs_Product("id")%>"><img src=<%=rs_Product("DefaultPicUrl")%> width="155" height="125" border=0 ></a></td>
</tr>
<tr>
<td height="40" colspan="2" align="center"><a href="Product_Show.asp?ID=<%=rs_Product("id")%>"><%=rs_Product("Title")%></a></td>
</tr>
</table></td>
<% if row_count mod 4 =0 then%>
</tr>
<tr>
<%end if%>
<%
rs_Product.MoveNext
row_count=row_count+1
Loop
end if
rs_Product.close
%>
</tr>
</table> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询