We're trying to return a result (or directly change the table) with ranking ties
I already asked a question on stackoverflow:
http://stackoverflow.com/questions/35948959/mysqli-ranking-with-ties
None of the related codes work on our Debian 8 server
For example:
- Code: Select all
SELECT tmp.UID,
tmp.Name,
@rnk := IF(@score = tmp.Score, @rnk, @rnk+1) AS Rank,
@score := tmp.Score as Score
FROM (
SELECT *
FROM $Table,
(SELECT @rnk := 0, @score = NULL) AS init
ORDER BY Score DESC
) AS tmp
- Debian 8
Xampp 5.6.19
MySQL(i) 10.1.10-MariaDB
I hope someone can help