关于上一篇 下一篇

搬运工865 2009-08-06 02:09:21
老了 糊涂了
大家指点一下
上一篇 下一篇 整糊涂了


id title content top1

top1字段(用于自定义顺序)


目前排序的是按照
top1 ASC(升序),id DESC(降序)

top1 是可以重复的
id 是不可以重复的


现在 我要读取 id为888的记录
那如何获取 上一篇 下一篇呢


郁闷了

补充一下 表内容
id top1 title
1185 5
1183 5
1178 5
286 5
283 5
1193 10
1190 10
1189 10
...全文
136 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
搬运工865 2009-08-09
  • 打赏
  • 举报
回复
可能是 我没说清楚

分给大家吧
淮少 2009-08-07
  • 打赏
  • 举报
回复
路过 顶起
mkcat 2009-08-07
  • 打赏
  • 举报
回复
select * from table where top1>"&当前文章的("top1")&" order by top1 asc,id desc
Jearol 2009-08-07
  • 打赏
  • 举报
回复
楼上的都不对

上一篇
select top 1 * from table where id>888 order by top1 desc,id asc

下一篇
select top 1 * from table where id<888 order by top1 asc,id desc
ly8199 2009-08-06
  • 打赏
  • 举报
回复
select top 1 * from table where top1 <"&当前文章的("top1")&" order by top1 asc,id desc

select top 1 * from table where top1>"&当前文章的("top1")&" order by top1 asc,id desc
ly8199 2009-08-06
  • 打赏
  • 举报
回复
select * from table where top1<"&当前文章的("top1")&" order by top1 asc,id desc

select * from table where top1>"&当前文章的("top1")&" order by top1 asc,id desc
myufo1234 2009-08-06
  • 打赏
  • 举报
回复
上一篇
select TOP 1 * from table1 where top1<=当前篇top1 and id<>当前篇id order by top1 desc,id asc
搬运工865 2009-08-06
  • 打赏
  • 举报
回复
目前是
上一页
select * from table where top1<="&当前文章的("top1")&" and id<>"&当前文章的id top1 asc,id desc

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧