|
试试这样:
public string GetNextPhotoUrl(string id){
string sql = "select top 1 id,PhotoUrl from 表名 where id>" + id + "order by id asc"
return GetPhotoUrl(sql);
}
public string GetPreviousPhotoUrl(string id){
string sql = "select top 1 id,PhotoUrl from 表名 where id<" + id + " order by id desc";
return GetPhotoUrl(sql);
}
|