Quoting Nick Wilson ([EMAIL PROTECTED]): > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > * and then Victoria Reznichenko declared.... > > NW> I've been searching for a solution to the following: > > > > NW> Is there an easy way to order by date (YYYY - MM - DD), at the moment my > > NW> results are coming back with the *day* ordered but not the whole date > > NW> like this: > > > > NW> 02 02 2002 > > NW> 03 03 2005 > > NW> 18 02 2003
... > and here is my select: > > $qry="SELECT id, module, week, "; > $qry.="DATE_FORMAT(date, \"%d %m %Y\") as date, "; > $qry.="ektione, title, teacher_id "; > $qry.="FROM $this->table "; > $qry.="WHERE module = '$module' "; > $qry.="ORDER BY date ASC"; Get rid of the "as date" from your sql query. I think that should make it work the way you want. James --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php