sql到mysql查询转换

I write a query but its not give right result in php mysql

CREATE TABLE score
    (`id` int, `member` varchar(3), `score` int)
;

INSERT INTO score
    (`id`, `member`, `score`)
VALUES
    (1, 'abc', 1),
    (2, 'def', 5 ),
    (3, 'ghi', 100),
    (4, 'jkl', 3)
;

SELECT    @rankNo:=@rankNo+1 RankNo,
          a.*
FROM      score a, (SELECT @rankNo:=0) r 
ORDER BY `score` DESC

its work in sql but not work correctly in mysql

You're probably running multiple queries at once which you cannot do unless you use functionality that specifically supports it (i.e. mysqli_multi_query()) which you almost certainly are not.

You need to run those queries separately for it to work with mysql_* functions.