//查询当前数据的下一条
select * from 表 where id > 当前数据的id order by id asc limit 1;
//查询当前数据的上一条
select * from 表 where id < 当前数据的id order by id asc limit 1
//查询当前数据的下一条
select * from bp_customer where id = (select min(id) from bp_customer where id > 当前数据的id);
//查询当前数据的上一条
select * from bp_customer where id = (select MAX(id) from bp_customer where id < 当前数据的id)
感觉第一种的效率更快一些