以下是我的asp代码?高手帮我看下错在哪里?我好改谢谢!
上一篇:<%
dim rsPrev
sql="Select * From shownew Where id<" & rs("id") & " order by id desc "
Set rsPrev= Server.CreateObject("ADODB.Recordset")
rsPrev.open sql,conn,1,1
if rsPrev.Eof then
response.write "暂无新闻"
else
response.write "<a href='open_shownews.asp?id="&rsPrev("id")& "'>"&rsPrev("title") & "</a>"
end if
rsPrev.close
set rsPrev=nothing
%><br />
下一篇:
<% dim rsNext
sql="Select * From shownew Where id>" & rs("id") & " order by id desc "
Set rsNext= Server.CreateObject("ADODB.Recordset")
rsNext.open sql,conn,1,1
if rsNext.Eof then
response.write "暂无新闻"
else
response.write "<a href='open_shownews.asp?id="&rsNext("id")& "'>"&rsNext("title") & "</a>"
end if
rsNext.close
set rsNext=nothing
%>