Welcome Guest, Not a member yet? Register   Sign In
The most efficient way to find position of a returned row relative to the total number of rows?
#1

[eluser]Dandy_andy[/eluser]
Suppose I have 100 rows in a table and each row has a value/column X which varies for each row. How can I found out what position a particular row is relative to when ordered by X? I am looking to do this so that I can output a position value based on the total number of rows ordered by value X. Is there a simple way to do this using the active record class and bearing in mind the number or rows will increase as entries are added?

Any help appreciated. Thanks in advance.


Messages In This Thread
The most efficient way to find position of a returned row relative to the total number of rows? - by El Forum - 12-22-2012, 05:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB