ASP求高手看下

来源:百度知道 编辑:UC知道 时间:2024/06/06 08:38:44
<%
sql="select * from PlayList where AreaID='"&request.QueryString("AID")&"' and TimeStop>#"&now()&"# order by TimeStart"
rs.open sql,conn,1,1
while not rs.eof
%>
<tr bgcolor="#FFFFFF">
<td><%=rs("NickName")%></td>
<td><%=rs("TimeStart")%></td>
<td><%=rs("TimeStop")%></td>
<td><%=rs("Descriptions")%></td>
<td><a href="PlayViews.asp?ViewID=<%=rs("ID")%>" target="PlayLeft">查看</a></td>
</tr>
<%
rs.movenext
wend
rs.close
%>

<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from PlayList where AreaID='"&request.QueryString("AID")&"' and TimeStop>'"&now()&"' order by TimeStart desc"
rs.open sql,conn,1,1
if not rs.eof and not rs.bof then
DO while not rs.eof
%>
<tr bgcolor="#FFFFFF">
<td><%=rs("NickName")%></td>
<td><%=rs("TimeStart")%></td>
<td><%=rs("TimeStop")%></td>
<td><%=rs("Descriptions")%></td>
<td><a href="PlayViews.asp?ViewID=<%=rs("ID")%>" target="PlayLeft">查看</a></td>
</tr>
<%
rs.movenext
loop
end if
rs.close
%>

有几个小错,都给你该过来了

没有SET RS