Xampp Mysql 5.5 query doesn't work in MariaDB 10.1.10

Alles, was MariaDB und MySQL betrifft, kann hier besprochen werden.

Xampp Mysql 5.5 query doesn't work in MariaDB 10.1.10

Postby Rhutos » 19. March 2016 12:36

Hey,

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
User avatar
Rhutos
 
Posts: 2
Joined: 19. March 2016 12:16
Location: Germany
Operating System: Debian 8

Re: Xampp Mysql 5.5 query doesn't work in MariaDB 10.1.10

Postby Rhutos » 23. March 2016 19:05

*Solved* (more or less)
http://fellowtuts.com/mysql/query-to-obtain-rank-function-in-mysql/
User avatar
Rhutos
 
Posts: 2
Joined: 19. March 2016 12:16
Location: Germany
Operating System: Debian 8


Return to MariaDB - MySQL

Who is online

Users browsing this forum: No registered users and 5 guests