RE: [PHP] order by date
| From: | John W. Holmes | Date: | Sat, 12 Apr 2003 02:48:25 +0000 |
| Subject: | RE: [PHP] order by date | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143592@lists.php.net to get a copy of this message | ||
> Ok I am trying to order my info via a non standard date
>
> being day-month-year
>
> so I use ORDER BY date ASC
>
> but it does order correctly
>
> I can change the date format because it is being sent via a program on
the
> client computer...so any possibilities
You could rip that date apart into each element and create a second
column in your SELECT. Assign it an alias and order by that column.
Or put everything into an array in PHP, do the above, and sort it using
PHP.
If you want to order it by date, you need it in a YYYY-MM-DD format for
it to be effective.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/