Date: 12/30/99
- Next message: Eric Ries: "Re: [PHPLIB] OOH Forms - extending for editing or deleting data"
- Previous message: Bryan McGuire: "Re: [PHPLIB] importing form variables, and more..."
- In reply to: Chris Johnson: "RE: [PHPLIB] Please help!"
- Next in thread: Stanislav Malyshev: "Re: [PHPLIB] Please help!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Umm, I think your solution will just bump your problem over one digit. I don't recall if MySQL allows syntax something like this?
$db->query("select user_id from members order by int(user_id) desc");
G
> 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: Eric Ries: "Re: [PHPLIB] OOH Forms - extending for editing or deleting data"
- Previous message: Bryan McGuire: "Re: [PHPLIB] importing form variables, and more..."
- In reply to: Chris Johnson: "RE: [PHPLIB] Please help!"
- Next in thread: Stanislav Malyshev: "Re: [PHPLIB] Please help!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

