1、查询当前的文章上一篇文章。
// 查询上一篇文章select * from articlewhere id =(select id fromarticle where id < ${id} order by id desc limit 1)
2、查询当前文章下一篇文章。
// 查询当前文章下一篇select * from articlewhere id =(select id from articlewhere id > ${id}order by id asc limit 1)
时间:2021-03-08 01:53:08
1、查询当前的文章上一篇文章。
// 查询上一篇文章select * from articlewhere id =(select id fromarticle where id < ${id} order by id desc limit 1)
2、查询当前文章下一篇文章。
// 查询当前文章下一篇select * from articlewhere id =(select id from articlewhere id > ${id}order by id asc limit 1)