上一条,下一条的SQL语句


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

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 取出一条。