◆ASP求助◆怎样显示“上一条,下一条”

来源:百度知道 编辑:UC知道 时间:2024/06/02 21:54:46
ASP怎样实现显示“上一条,下一条”?
上一条:*****
下一条:*****

◆最希望的是有较详细的注释,很精典,精简的代码。谢谢--
希望再详细一点哦。 为什么总是用 select top 1 呢?
能不能举一个精简,精典的例子?

当前id为55
上一条select top 1 * from table where id<55 order by id desc

下一条select top 1 * from table where id>55 order by id

比当前大的第一条就是下一条
比当前小的第一条就是上一条

复制我答案

天啊
这就够精简的了,给俺分

当前id为55
上一条select top 1 * from table where id<55 order by id desc

下一条select top 1 * from table where id>55 order by id

还要注意分类等相关参数。

就是用的ASP分页嘛。。

参考这里