我为什么查询出来只显示最后一条记录啊。。求解释啊在线等 急
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="ConstSite.asp"-->
<!--#include file="ConnSite.asp"-->
<!--#include file="Function.Asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link rel="stylesheet" type="text/css" href="index.css"/>
</head>
<body>
<div id="head">
<table width="260" height="213" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="218" height="23" id="test-link-pdc"><img src="images/yongjie_11.gif" /><span class="STYLE1">最新动态</span></td>
<td width="82" align="right"><img src="images/yongjie_09.gif" /></td>
</tr>
<tr>
<td height="10" colspan="2" align="center"><img src="images/yongjie_19.gif" width="244" height="6" /></td>
</tr>
<tr>
<td colspan="2"><%
set rs=conn.execute("select top 7 ID,NewsName,AddTime from Ameav_News where sortid=19 or sortid=20 and ViewFlag=-1 order by ID desc")
%>
<table width="300" border="0" align="center" cellpadding="0" cellspacing="0" class="newslist" style="margin-top:10px; margin-bottom:10px; font-size:13px;">
<%
if rs.bof and rs.eof then
response.Write("<tr><td align=center height=100>暂无信息</td></tr>")
else
do while not rs.eof
%>
<tr >
<td width="219" height="26" align="left" valign="middle" style="border-bottom:1px dashed #CFCFCF; background:url(images/yongjie_26.gif); background-repeat:no-repeat;">
<a style="text-indent:1em;" href="showarticle.asp?id=<%=rs("ID")%>" title="<%=rs("NewsName")%>" target="_blank"><%=Left(rs("NewsName"),17)%></a></td>
<td width="81" align="left" valign="middle" style="border-bottom:1px dashed #CFCFCF;">(<%=formatdatetime(rs("AddTime"),2)%>)</td>
</tr>
<%
rs.movenext
loop
end if
%>
</table>
<%
rs.close
set rs=nothing
%></td>
</tr>
</table>
</div>
</body>
</html>
------解决方案--------------------
select top 7 ID,NewsName,AddTime from Ameav_News where sortid=19 or sortid=20 and ViewFlag=-1 order by ID desc
这条语句查出来的结果有几条?