Re: [PHPLIB] Please help! From: Claes Månsson (cj <email protected>)
Date: 12/30/99

Joel skrev:

<cut>

> 5
> 4
> 3
> 2
> 1
> 1000
> But I want to display 1000 first.
>
> How can I achieve it?

Pad the field with leading zeros, then sort it:

0005
0004
0003
0002
0001
1000

Like so:

select right(concat('00000000',user_id),8) as sort from members order by sort

Hope this helps
/Claes
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.