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
时间: 2024-11-01 19:17:25
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