创想兵团军需宝箱有啥:多列 数据库 asp

来源:百度文库 编辑:高校问答 时间:2024/05/02 20:07:53
请教各位,这段代码查询出来的结果是单列显示,我想让它分4列显示,应该如何做,能否给出完整代码,谢谢各位了,急!

<!--#include file="mycartconn/page.asp" -->
<%set s = Server.CreateObject("testobj")
if request("lbid")="" or request("lbid")="0" or not isnumeric(request("lbid")) then lbid="" else lbid="lbid="&s.shuzi("lbid")&" and"
if request("key")<>"" then key="bt like '%"&s.txt("key")&"%' and"else key=""
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select top 300 bt,ly,sj,html from news where "&lbid&" "&key&" zt=1 order by id desc"
rs.open sql,conn,3,1
page1("30")%>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="5"></td>
</tr>
<tr>
<td height="25" bgcolor="#f1f1f1">   您的位置:首页 >> 搜索</td>
</tr>
</table>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<%i=1
do while not rs.eof and i<=rs.pagesize%><tr>
<td width="35"> </td>
<td width="700" height="25" valign="middle">
<%Response.Write(" ·<a href=/html/"&rs("html")&" target=_blank>"&rs("bt")&"</a> <font color=#aaaaaa>("&rs("ly")&","&month(rs("sj"))&"月"&day(rs("sj"))&"日)</font><br>")%>
</td>
<td width="35"> </td>
</tr><%i=i+1
rs.MoveNext
loop%>
<tr>
<td width="35"> </td>
<td width="700" height="25" align="center">
<%page2("lbid="&request("lbid")&"&key="&request("key")&"&")
rs.close
set rs=nothing
set s=nothing
conn.close:set conn=nothing%>
</td>
<td width="35"> </td>
</tr>
</table>