读书人

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

发布时间: 2012-02-21 16:26:23 作者: rapoo

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

读书人网 >ASP

热点推荐