Mysql Query (Sorry not a PHP q i know)
From: Axrock (axrock_at_wazzup.co.nz)
Date: 12/29/04
- Next message: Oli Filth: "Re: Mysql Query (Sorry not a PHP q i know)"
- Previous message: Lee Marsh: "Re: MySQL question"
- Next in thread: Oli Filth: "Re: Mysql Query (Sorry not a PHP q i know)"
- Reply: Oli Filth: "Re: Mysql Query (Sorry not a PHP q i know)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 29 Dec 2004 12:08:36 +1300
Sorry to ask this question in here, but all the dudes that know anything
about this seem to be in here.
I have a MySql table that stores:
date (MYSQL format) 0000-00-00
and Time: 00:00:00
I need to SELECT from the database and order by Date then time DESC.
Thing is I can't get it to work.
I have this.
SELECT * FROM table ORDER BY date,time DESC.
It only ever orders the time not the date. It gives me the date with oldest
first, and the time with newest first.
Basically I want the most Recent date to show on my list first then the
times in descending order also.
Any idea how to do this?
A basic example of my result is this.
2004-12-26 20:30
2004-12-26 19:30
2004-12-27 18:30
2004-12-28 12:30
I want:
2004-12-28 12:30
2004-12-27 18:30
2004-12-26 20:30
2004-12-26 19:30
Make sense?
Thanks,
Ax
- Next message: Oli Filth: "Re: Mysql Query (Sorry not a PHP q i know)"
- Previous message: Lee Marsh: "Re: MySQL question"
- Next in thread: Oli Filth: "Re: Mysql Query (Sorry not a PHP q i know)"
- Reply: Oli Filth: "Re: Mysql Query (Sorry not a PHP q i know)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]