代码如下:
<!--#include file="conn/conn.asp"-->
<% set rs_luck=server.CreateObject("adodb.recordset")
sql="select * from tab_luck "
rs_luck.open sql,conn,0,1
if rs_luck.eof and rs_luck.bof then
Response.Write "<div align=center>暂无数据</div> "
end if%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="37%" align="left">名称:</td>
<td width="63%"><%=rs_bizi("title")%></td>
</tr>
<tr>
<td align="left">积分:</td>
<td><%=rs_bizi("gamefen")%>(分)</td>
</tr>
<tr>
<td align="left">浏览:</td>
<td><%=rs_bizi("hit")%>(次)</td>
</tr>
<tr>
<td colspan="2" align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left">简介:<%=rs_bizi("content")%></td>
</tr>
</table>
让它两列显示
只显示一行就行了
写出代码就太谢谢了
參考答案:你在一个循环里面每次显示两条记录就可以了三:
Do While Not rs_bizi.Eof
Response.Write "<tr>"
Response.Write "<td>..</td><td>...</td>......" '显示一条记录
rs_bizi.MoveNext
If rs_bizi.Eof Then
Response.Write "<td colspan='9'> </td>"
Response.Write "</tr>"
Exit Do
Else
Response.Write "<td>..</td><td>...</td>......" '再显示一条记录
Response.Write "</tr>"
rs_bizi.MoveNext
Loop