码迷,mamicode.com
首页 > 数据库 > 详细

MYSQL实现上一条下一条功能

时间:2016-08-18 21:13:01      阅读:207      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!