日期:2014-05-17  浏览次数:20810 次

高手帮忙一下!
比如,我链接一个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 ")%> '这个就是这条记录在库中的真正排名