当前位置: 代码迷 >> ASP >> 高手帮忙一下!该怎么解决
  详细解决方案

高手帮忙一下!该怎么解决

热度:69   发布时间:2012-02-21 16:26:23.0
高手帮忙一下!
比如,我链接一个ID过来,我要知道他这一条记录在表中的位置就是多少条记录,要数字如20

------解决方案--------------------
SQL= "select *,(select count(1) from (select distinct id from news ) t where t.id> =a.id) as PM from news a where id= "&request( "id ") order by id desc "


<%=rs( "pm ")%> '这个就是这条记录在库中的真正排名
  相关解决方案