当前文章的ID =request("id")
下一篇select top 1 id,title from 表名 where id<当前文章的ID order by id desc
上一篇select top 1 id,title from 表名 where id>当前文章的ID order by id asc
如果id不是整数而是字符串的话,就比较麻烦了。
当前文章的ID =request("id")
下一篇select top 1 id,title from 表名 where id<当前文章的ID order by id desc
上一篇select top 1 id,title from 表名 where id>当前文章的ID order by id asc
如果id不是整数而是字符串的话,就比较麻烦了。