您的位置:首页 > 其它

关于文章浏览里的上一条和下一条的实现方法

2006-02-20 13:18 525 查看
<a href="content.asp?pev=<%=rs("id")%>">上一条</a> <a href="content.asp?last=<%=rs("id")%>">下一条</a>

If pev="" And last="" then
sql="select * from informains where chk='1' and id=" & CInt(id)
Else
If pev<>"" Then
sql="select top 1 * from informains where chk='1' and id<" & CInt(pev) & " order by id desc"
End If
If last<>"" Then
sql="select top 1 * from informains where chk='1' and id>" & CInt(last)
End if
End If
注意看上面的SQL语句!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: