I am using MySQL 5.6 under Linux.
I have a table to let user input a from-number and a to-number.
Then, there is a view to select some records from another table
Yon can take a look to this question and the answer that I report here:
There is no ranking functionality in MySQL. The closest you can get is to use a variable:
SELECT t.*, @rownum := @rownum + 1 AS rank FROM YOUR_TABLE t, (SELECT @rownum := 0) r
In this way you can add a row counter to your result.