below query cool for normal users ranking by score but I need a query with same rank result for same scores in table
SET @rank = 0;
SELECT * FROM (
SELECT @rank:=@rank + 1 AS rank,score, user_id FROM site_crossword_members ORDER BY score DESC
) as tmp;
thanks
Are you sure that your given query even works properly? I recall
ORDER BYto be done afterSELECT, thus making your rank sort byID ASCor similiar.Shortened version: