如何让原来显示1列的ASP代码改成两列?

来源:百度知道 编辑:UC知道 时间:2024/05/08 10:50:05
<%sub myline(classid)%>
<%
if classid=1 then
theclass=1
sql_top="select top 5 * from line where op_type like '%"&theclass&"%' and classid=1 order by hots asc,id desc "
end if
if classid=2 then
theclass=1
sql_top="select top 5 * from line where op_type like '%"&theclass&"%' and classid=2 order by hots asc,id desc "
end if
if classid=3 then
theclass=1
sql_top="select top 5 * from line where op_type like '%"&theclass&"%' and classid=3 order by hots asc,id desc "
end if
if classid=4 then
theclass=1
sql_top="select top 5 * from line where op_type like '%"&theclass&"%' and classid=4 order by hots asc,id desc "
end if
set rs_top=Server.CreateObject("ADODB.Recordset")
rs_top.open sql_top,conn,1,1
if (rs_top.eof and

有一个简便的方法,可参考(结合表格,以下格式套用后就可用)
<table border=0 cellpadding=0 cellspacing=0>
<%
'资料集及SQL语句
for i=1 to rs.recordcount
%>
<tr>
<%for j=1 to 2%>
<td>这裏在IE中就会显示一行两列</td>
<%
rs.movenext
if rs.eof then exit exit for
next
%>
</tr>
<%next%>
</table>

回答即不知道可得2分,回答被采纳则获得悬赏分以及奖励20分