RE: [PHP] Re: mysql ORDER BY problem
| From: | Peter Lauri | Date: | Sun, 18 Jun 2006 17:51:53 +0000 |
| Subject: | RE: [PHP] Re: mysql ORDER BY problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-238247@lists.php.net to get a copy of this message | ||
Just do:
SELECT * FROM thetable ORDER BY yourfieldyouwanttoorder
If you want it in reverse order you add DESC in the end.
/Peter
-----Original Message-----
From: John Nichel [mailto:jnichel@by-tor.com]
Sent: Monday, June 19, 2006 5:51 AM
To: php-general@lists.php.net
Subject: Re: [PHP] Re: mysql ORDER BY problem
Rob W. wrote:
> It's not in general to mysql, it's how php and mysql is displaying it.
>
That's not what you asked. You asked how to do it with your query,
which has nothing, nadda, zip to do with PHP. You want MySQL to do the
sorting, look at the MySQL manual under the select syntax, or ask on the
MySQL list. You want PHP to do the sorting, look at PHP's array
functions; however, it'd be more efficient to go the MySQL route.
> ----- Original Message ----- From: "Michael Rasmussen" <mir@miras.org>
> To: <php-general@lists.php.net>
> Sent: Sunday, June 18, 2006 4:51 PM
> Subject: [PHP] Re: mysql ORDER BY problem
>
>
>> On Sun, 18 Jun 2006 15:55:14 -0500, Rob W. wrote:
>>
>>>
>>> Is there a way with my mysql query so that I can list the numbers in
>>> correct order?
>>>
>> In what way is this problem related to PHP?
>> Try a MySQL group instead.
>>
--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php