There is no ranking functionality in MySQL.
Use Variable to get the row number.
Step 1:
Examples:
SELECT
@i:=@i+1 AS Row_Number,t.* FROM transactiontable AS t,
(SELECT @i:=0) AS Temp LIMIT 5
RESULT:
Step 2:
SET @i=0;
SELECT @i:=@i+1 AS Row_Number,t.* FROM transactiontable AS t limit 10
RESULT:
0 Comments