ASP输出列问题???

来源:百度知道 编辑:UC知道 时间:2024/05/10 09:58:01
高手请帮忙ASP输出列问题???

<% If Not rsnews.EOF Or Not rsnews.BOF Then %>
<%
'生成页码
if rsnews_total mod list_repeat = 0 then
mm_page_count= rsnews_total/list_repeat
else
mm_page_count= int(rsnews_total/list_repeat)+1
end if
for i = 1 to mm_page_count
mm_page_list =mm_page_list&vbcrlf&" <a href="&chr(34)&"list_"&i&".htm"&chr(34)&">第"&i&"页</a> "
next
%>
<% While ((Repeat1__numRows <> 0) AND (NOT rsnews.EOF)) %>
<%
areyou = areyou&"<td>● <a href=""../"&(rsnews_commend.Fields.Item("file_name").Value)&chr(34)&" target="&chr(34)&"_blank"&chr(34)&">"&(rsnews_commend.Fields.Item("productname").Value)&"</a></td>"
%>
<%
if mm_temp <> mm_page then
mm_file = "list_"& mm_page &

<% While ((Repeat1__numRows <> 0) AND (NOT rsnews.EOF)) %>
前面加
<%
j = 1
%>


rsnews.MoveNext()
Wend
后面加

<%
if j mod 5 = 0 then response.write "</tr><tr>"
j = j + 1
%>

SQL语句中加上 TOP 5 就可以了