Date: 12/30/99
- Next message: Philip Strnad: "[PHPLIB] Off-topic - Database design issue"
- Previous message: Joel: "Re: [PHPLIB] Please help!"
- In reply to: Joel: "[PHPLIB] Please help!"
- Next in thread: Claes Månsson: "Re: [PHPLIB] Please help!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
J>>
J>> How to convert a string to numbers in mysql sql statement?
J>> eg. $db->query("select user_id from members order by user_id desc");
J>> however, the user_id type is string type.
J>> For the table, the user id is of string type but with value
J>> 1,2,3,4,5....1000. However, if I use the sql statement above, the
J>> results becomes
Try using this:
select user_id,user_id+0 as num_id from members order by num_id desc
-- Stanislav Malyshev stas <email protected> +972-3-6139665- 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: Philip Strnad: "[PHPLIB] Off-topic - Database design issue"
- Previous message: Joel: "Re: [PHPLIB] Please help!"
- In reply to: Joel: "[PHPLIB] Please help!"
- Next in thread: Claes Månsson: "Re: [PHPLIB] Please help!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

