MySQL中实现上一页下一页效果

时间:2016-05-16 00:15:16   收藏:0   阅读:1815

MySQL中实现上一页下一页效果

下一页

select * from article where aid = (select aid from article where aid > ? order by aid asc limit 1);

上一页

select * from article where aid = (select aid from article where aid < ? order by aid desc limit 1); 

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!