Re: [PHPLIB] Please help! From: Stanislav Malyshev (stas <email protected>)
Date: 12/30/99

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.