首页 > 数据库技术 > 详细

MYSQL实现上一条下一条功能

时间:2016-08-18 21:10:21      阅读:341      评论:0      收藏:0      [点我收藏+]

select id from
(
select *, (@i:=@i+1) as rownum from pre_bet_zhibo,(select @i:=0) as it
where link_conent like ‘%足%‘
order by title
) as t1 where rownum =
(
select rownum from
(
select *, (@i:=@i+1) as rownum from pre_bet_zhibo,(select @i:=0) as it
where link_conent like ‘%足%‘
order by title
) as t1
where id = 186
) + 1;

select *, (@i:=@i+1) as rownum from pre_bet_zhibo,(select @i:=0) as it
where link_conent like ‘%足%‘
order by title

MYSQL实现上一条下一条功能

原文:http://www.cnblogs.com/yufan27209/p/5785222.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!