求助:ASP在ACC数据库中只取11条数信息

来源:百度知道 编辑:UC知道 时间:2024/09/28 12:20:48
我想限制下取出数据的条数。由于以下代码没有限制条数,我只想取最先满足条件的11条信息即可,其余的忽略不显示。知道的大侠请帮我改改代码,谢谢!
----------------------------
相关代码
<%
set rs=conn.execute("select top "&index_list_num&" 自动编号,信息标题 from info where 是否推荐=true order by 发表时间 desc")
do while not rs.eof
%>
<font color="#56A118">·</font><a href="/info_view.asp?show_id=<% =rs("自动编号")%>" target="_blank" title="<% =rs("信息标题")%>">
<% =left(rs("信息标题"),14)%>
</a><br>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
不好意思,是这个代码

<%
set rs=conn.execute("select top 11 * from info order by 点击次数 desc")
do while not rs.eof
%>
<font color=

<%
set rs=conn.execute("select top 11 "&index_list_num&" 自动编号,信息标题 from info where 是否推荐=true order by 发表时间 desc")
do while not rs.eof
%>
<font color="#56A118">·</font><a href="/info_view.asp?show_id=<% =rs("自动编号")%>" target="_blank" title="<% =rs("信息标题")%>">
<% =left(rs("信息标题"),14)%>
</a><br>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>