asp如何实现文章例表上一篇下一篇标题形式出现的,求帮助
我的asp代码是这样的,求高手帮助<%
sqlb="select top 1 n_title,n_id from news where id<"&rs("n_id")&" and n_id="&rs("n_id")&" order by n_id desc"
set rsb=conn.execute(sqlb)
if rsb.eof then
response.write "上一篇: <font color=#999999>没有了</font>"
else
response.write "上一篇: <a href='news.asp?id="&rs("n_id")&"id="&rsb("n_id")&"' title='"&rsb("n_title")&"'>"&rsb("n_title")&"</a>"
end if
%>
<%
sqlb="select top 1 n_title,n_id from news where id<"&rs("n_id")&" and n_id="&rs("n_id")&" order by n_id desc"
set rsn=conn.execute(sqln)
if rsn.eof then
response.write "下一篇: <font color=#999999>没有了</font>"
else
response.write "下一篇: <a href='news.asp?id="&rs("n_id")&"id="&rsn("n_id")&"' title='"&rsn("n_title")&"'>"&rsn("n_title")&"</a>"
end if
%>
实现效果是这样:
access数据news例表
有高手帮助一下的吗,我调了好久都调不好