江苏建设摩托车怎么样:请问一下一个数据库调用用的问题!麻烦大家了

来源:百度文库 编辑:高校问答 时间:2024/05/03 03:37:46
我搜集了一个数据库 里面有这样的几个表
ID title (标题)Content(内容) keyword(类别)author(作者)ahome(来自)count(点次数) clid
1 111111 内容为HTML代码 娱乐 匿名 河北 10 1
主题很多! 我想弄一个让它显示10条最新的文章如下

人气最高的 最新的文章

显示 10 条 剩下的文章 做成分页 1 2 3 4 5 6 下一页 (样式)

我自己写的代码,但是 用这个代码 所有的数据会全部都显示出来!!!
<!--#include file="conn.asp"-->
<%
exec="select * from news"
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
%>
新闻排行榜
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%do while not rs.eof%><tr>
<td><a href="<%=rs("Content")%>" target="_blank">><%=rs("title")%> </a> </td>
<td></td>
</tr><%
rs.movenext
loop
%>
</table>

select top 10 from news order by id desc