select * from
(
select *, (@i:=@i+1) as rownum from core_app_content,(select @i:=0) as it
order by create_date DESC
) as t1 where rownum =(
(
select rownum from
(
select *, (@j:=@j+1) as rownum from core_app_content,(select @j:=0) as it
order by create_date DESC
) as t1
where id = '33b3bc1331064b14860fc60b93c9f157'
) + 1);
================================
select * from
(
select *, (@i:=@i+1) as rownum from core_app_content,(select @i:=0) as it
order by create_date DESC
) as t1 where rownum =(
(
select rownum from
(
select *, (@j:=@j+1) as rownum from core_app_content,(select @j:=0) as it
order by create_date DESC
) as t1
where id = '33b3bc1331064b14860fc60b93c9f157'
) - 1);
mysql上一条下一条功能实现
最新推荐文章于 2024-01-24 17:42:15 发布