views:

99

answers:

1

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,

+2  A: 

There are couple of ways.

Roland Bouman