Re: Ranks and ties (more)

From: Date: Wed, 21 Jun 2000 13:23:55 +0000
Subject: Re: Ranks and ties (more)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-2483@lists.php.net to get a copy of this message
At 01:53 PM 6/21/00 +0930, David Robley wrote:
Very much off the top of my head and untested, but essentially what you need is to check if the current employee number is the same as the klast; if so they share the same ranking. And you presumably want the rankings to skip if there are 'equals' so you get something like:
Hey, David, thanks. This works quite well, but now I want more (it's human nature). If I want to display only the "top 25" how do I tell my script where to draw the cutoff? I can't use LIMIT in the query, because if there happens to be a tie in the top 25 then I'll come up short on my list -- displaying 25 companies, but showing only those ranked 1-24! See, the trouble is, I don't want to have to maintain a RANKS column in my db. Maybe there's a way to do this with a function in MySQL? Any more hints/suggestions would be appreciated! --- mtonelli@bway.net phone 718 728 7567 * fax 718 728 4420

« previous php.general (#2483) next »