SELECT
( @i := @i + 1 ) AS row,
user_info.*
FROM
user_info,
( SELECT @i := 0 ) AS rows;
SET @rownum=0;
SELECT @rownum :=@rownum+1 AS rownum,user_info.* FROM user_info ORDER BY user_info.id DESC LIMIT 0,10;
SELECT
( @i := @i + 1 ) AS row,
user_info.*
FROM
user_info,
( SELECT @i := 0 ) AS rows;
SET @rownum=0;
SELECT @rownum :=@rownum+1 AS rownum,user_info.* FROM user_info ORDER BY user_info.id DESC LIMIT 0,10;