Re: Creating a ranking
| From: | (Stas Trefilov) | Date: | Thu, 18 Jan 2001 07:42:34 +0000 |
| Subject: | Re: Creating a ranking | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-5944@lists.php.net to get a copy of this message | ||
Hello, "Fabio Ottolini (EDB!
You wrote:
> user mpontos
> UserA 1532
> James Brown 1349
> UserB 1229
>
> The most important part is that it cannot be any user
> with more or less =
> points than James Brown. It must be exactly the users
> with the smallest =
> difference to his amount of points. Do you have any
> suggestions?
Use ABS() function to find the smallest difference between
the values, ORDER BY ASC(mpontos - <James Browns' mpontos>)
--
Piloteers do it on the road