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

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to