标题:[求助]关于新闻发布系统的输出!!~~我怎么让他输出两列啊?
只看楼主
yangrui0307
Rank: 1
等 级:新手上路
帖 子:78
专家分:0
注 册:2005-12-5
 问题点数:0 回复次数:1 
[求助]关于新闻发布系统的输出!!~~我怎么让他输出两列啊?
下面的是在一列里限制输出10行 我想要在这一个table里 输出两列 每列10行应该怎么办啊???????请大侠们指教

<table width="87%" border="0" cellspacing="0" cellpadding="0">
<%
cnt=0
set rs=server.CreateObject("adodb.recordset")
sql="select * from news where news_title='123' and news_title1='124'"
rs.open sql,conn,1,1
do while not rs.eof
cnt=cnt+1
if cnt<10 then
%>
<tr>
<td width="15%" align="right" valign="middle"><span class="STYLE4">·</span></td>
<td width="85%" class="STYLE19"><%=rs("news_name")%>&nbsp;
</tr>
<%
end if
rs.movenext
loop
%>
</table>
搜索更多相关主题的帖子: 新闻发布 系统 输出 
2006-06-05 14:15
icecool
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:20
帖 子:1214
专家分:1366
注 册:2005-3-14
得分:0 
<table width="87%" border="0" cellspacing="0" cellpadding="0">
<tr>
<%
i=1
set rs=server.CreateObject("adodb.recordset")
sql="select top 20 * from news where news_title='123' and news_title1='124'"
rs.open sql,conn,1,1
do while not rs.eof
%>

<td width="15%" align="right" valign="middle"><span class="STYLE4">·</span></td>
<td width="85%" class="STYLE19"><%=rs("news_name")%>
<%
if i mod 2 =0 then
%>
</tr>
<%
end if
%>
<%
i=i+1
rs.movenext
loop
%>
</table>

http://toorup.3v.do
loading...
2006-06-05 20:06



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-69867-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.130800 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved