[原]sql语句上一篇,下一篇
只是记录一下,见笑了:)
Keywords:sql语句上一篇,下一篇 上一条,下一条
string preSql = "select * from [news] where news_id = (select MAX(news_id) from [news] where news_id<" + id + ")";
string nextSql = "select * from [news] where news_id = (select MIN(news_id) from [news] where news_id>" + id + ")";
string nextSql = "select * from [news] where news_id = (select MIN(news_id) from [news] where news_id>" + id + ")";
Keywords:sql语句上一篇,下一篇 上一条,下一条