MYSQL实现上一条下一条功能

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

posted @ 2021-01-08 19:14  韩憨  阅读(437)  评论(0编辑  收藏  举报
//看板娘