bitsCN.com SELECT * FROM (SELECT pid, (@rowno:=@rowno+1) as rowno FROM user, (select (@rowno:=0)) b WHERE cid = 1 order by total_score DESC) as c WHERE pid = 1bitsCN.com