<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语句!
时间: 2024-10-02 20:10:19