Date: 12/29/99
- Next message: Adrox: "[PHPLIB] Extracting URL"
- Previous message: Joel: "[PHPLIB] Please help!"
- In reply to: Joel: "[PHPLIB] Please help!"
- Next in thread: Joel: "Re: [PHPLIB] Please help!"
- Reply: Joel: "Re: [PHPLIB] Please help!"
- Reply: Kristian Koehntopp: "Re: [PHPLIB] Please help!"
- Reply: garyb <email protected>: "Re: [PHPLIB] Please help!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Try this:
$db->query("select 0 + user_id from members order by user_id desc");
..chris
> -----Original Message-----
> How to convert a string to numbers in mysql sql statement?
> eg. $db->query("select user_id from members order by user_id desc");
> however, the user_id type is string type.
> For the table, the user id is of string type but with value
> 1,2,3,4,5....1000. However, if I use the sql statement above, the
> results becomes
> 5
> 4
> 3
> 2
> 1
> 1000
> But I want to display 1000 first.
>
> How can I achieve it?
-
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: Adrox: "[PHPLIB] Extracting URL"
- Previous message: Joel: "[PHPLIB] Please help!"
- In reply to: Joel: "[PHPLIB] Please help!"
- Next in thread: Joel: "Re: [PHPLIB] Please help!"
- Reply: Joel: "Re: [PHPLIB] Please help!"
- Reply: Kristian Koehntopp: "Re: [PHPLIB] Please help!"
- Reply: garyb <email protected>: "Re: [PHPLIB] Please help!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

