如何从@curRank获得排名位置

want to call up a ranking position is it posible with @curRank?

I created a rank table with

    SELECT `item`, (`totalrate` / `nrrates`) AS `rank`, @curRank := @curRank 
+ 1 AS `ranking`  FROM `rtgitems`, (SELECT 

    @curRank := 0) r WHERE item
    REGEXP 'Total'
     ORDER BY (`totalrate` / `nrrates`)  DESC

I get a table

item       rank      ranking 

Karla       9.5       1
Kelly       9.3       2
Arian       9.1429    3

in the kelly page i want to call up her ranking position

    SELECT `item`, (`totalrate` / `nrrates`) 
AS `rank`, @curRank := @curRank + 1 AS `ranking` 
FROM `rtgitems`, 
(SELECT @curRank := 0) r WHERE item REGEXP 'kelly' 
ORDER BY (`totalrate` / `nrrates`) DESC LIMIT 10
echo "<td align='center' width='250'>" . $row['ranking'] . "</td>";  

but it only gives me a 1 instead of 2

You can move the WHERE clause out of ranking calculation results.

Example:

SELECT * FROM (
    SELECT
        `item`, (`totalrate` / `nrrates`) AS `rank`, 
        @curRank := @curRank + 1 AS `ranking` 
    FROM `rtgitems`, (SELECT @curRank := 0) r 
    ORDER BY (`totalrate` / `nrrates`) DESC 
    LIMIT 10
) results
WHERE item REGEXP 'kelly'