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 = 1
05-04 00:59