Date: 12/30/99
- Next message: Kristian Koehntopp: "Re: [PHPLIB] Please help!"
- Previous message: Jesse Swensen: "[PHPLIB] Building a URL"
- In reply to: Joel: "[PHPLIB] Please help!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Kristian Koehntopp: "Re: [PHPLIB] Please help!"
- Previous message: Jesse Swensen: "[PHPLIB] Building a URL"
- In reply to: Joel: "[PHPLIB] Please help!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

