dcaa7e3
Update ddnet-release.sh, osx cross compiling wo... - def-SET @prev := NULL;
SET @rank := 1;
SET @pos := 0;
select Rank, Name, Points from (select (@pos := @pos+1) pos, (@rank := IF(@prev = Points,@rank,@pos)) Rank, Points, Name from (select (@prev := Points) Points, Name from %s_points order by Points desc) as ll) as l LIMIT %d, 5;
with this points table
+-----------+--------+
| Name | Points |
+-----------+--------+
| timakro | 611 |
| timakroa | 100 |
| timakroaa | 0 |
+-----------+--------+
i get this
+------+-----------+--------+
| Rank | Name | Points |
+------+-----------+--------+
| 1 | timakro | 611 |
| 2 | timakroa | 100 |
| 2 | timakroaa | 0 |
+------+-----------+--------+
any ideas?