MySQL Forums
Forum List  »  General

Re: Finding a record's position when sorted
Posted by: Peter Brawley
Date: November 14, 2006 05:01PM

How about ...
SELECT popularity INTO @pop FROM tbl WHERE id=$id;
SELECT COUNT(*) FROM tbl WHERE popularity < @pop;

Options: ReplyQuote


Subject
Written By
Posted
Re: Finding a record's position when sorted
November 14, 2006 05:01PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.