October 10th, 2000, 04:23 PM
Hi there, i have a simple request. i have to do a select statement in a table to find out what row is ranked where, when ordered from greatest to least.
For example: if the ratings are 1, 4, 6.7, 10, I want to be able to find out what spot the number 4 would be at, without looping throughout the entire list.
Is there a ROWlOCATION function or something?
October 10th, 2000, 05:02 PM
select * from table_name order by rank desc limit 3,1;
Would return the row with the 4th highest rank. limit m,n (m is the index of the row to start the return from ... 0 is the first, and n is the number of rows to return)