asp获取下一篇文章的标题
我的代码<!--#includefile="conn.asp"--><%ID=cint(replace(replace(replace(replace(replace(r...
我的代码
<!--#include file = "conn.asp"-->
<%
ID = cint(replace(replace(replace(replace(replace(replace(request("ID"),"'",""),"%",""),"&",""),"*",""),">",""),"<",""))
%>
<%
sql="Select * from WEBNEWS where ID < "&ID
set rs = conn.execute(sql)
if rs.eof or rs.bof then
%>
document.write("没有了")
<%else%>
document.write("<a href='<%=rs("File_Name")%>'><%=rs("News_Title")%></a>")
<%end if%>
<%
rs.close
set rs=nothing
call closeconn()
%>
可是运行显示的下一篇是最后一篇文章
我知道应将获取的记录集倒序排列 可是不知道怎么写 sql 语句
上一篇 运行成功 没问题 展开
<!--#include file = "conn.asp"-->
<%
ID = cint(replace(replace(replace(replace(replace(replace(request("ID"),"'",""),"%",""),"&",""),"*",""),">",""),"<",""))
%>
<%
sql="Select * from WEBNEWS where ID < "&ID
set rs = conn.execute(sql)
if rs.eof or rs.bof then
%>
document.write("没有了")
<%else%>
document.write("<a href='<%=rs("File_Name")%>'><%=rs("News_Title")%></a>")
<%end if%>
<%
rs.close
set rs=nothing
call closeconn()
%>
可是运行显示的下一篇是最后一篇文章
我知道应将获取的记录集倒序排列 可是不知道怎么写 sql 语句
上一篇 运行成功 没问题 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询