我只懂得用photo.asp?pageno=rs("id")+1的方法翻下一个图片
现在因为数据库ID项部分被删除,所以无法再用,请问还有什么办法吗?谢谢~~~
[此贴子已经被作者于2004-09-25 09:49:56编辑过]
用大于
小于
<% '**********如何显示上一篇文章和下一篇文章的写法:*********************************** articleid=trim(request("articleid")) sqlPrev="select top 1 * from article where articleid<" & articleid & " order by articleid desc" sqlNext="select top 1 * from article where articleid>" & articleid & " order by articleid" set rsPrev=conn.execute(sqlPrev) set rsNext=conn.execute(sqlNext) response.write "上一篇文章:" if rsPrev.Eof then response.write "没有了" else response.write "<a href='list.asp?ArticleID=" & rsPrev("ArticleID")& "' title='文章标题:" & rsPrev("Title") &"'>" & rsPrev("Title") & "</a>" end if response.write "<br>下一篇文章:" if rsNext.Eof then response.write "没有了" else response.write "<a href='list.asp?ArticleID=" & rsNext("ArticleID")& "' title='文章标题:" & rsNext("Title") &"'>" & rsNext("Title") & "</a>" end if
rsPrev.close set rsPrev=nothing rsNext.close set rsNext=nothing %>
给你一点灵感