上一条,下一条的SQL语句

select id, title from example where updatedate > (select updatedate from example where id =&id) and status = 1 order by updatedate limit 0, 1

1,上一条:日期大于当前&id的,同时可能有很多条,就用 limit, 0 ,1 取出一条。