Question

How can I add a field that contains a rows rank within the result set of a query?

Initially I used php to rank my results as it was all on a single page. Now I have added multiple pages so now even though I am on the second page the first result on the page is still '1st'. Obviously I could multiply the page number by the number of results per page and add the result number but I imagine there is a better way within the query.

Thanks,

Was it helpful?

Solution

There are couple of ways.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top