Results 1 to 2 of 2

Thread: order by date in mysql query

  1. #1
    Join Date
    May 2008
    Location
    Canada
    Posts
    45

    order by date in mysql query

    ok questions.

    i am sorting a type 'date' in my database, which is evidently a date inserted as now()

    but when i try things like 'ORDER BY mix_date DESC' the results are NOT properly ordered by date. whats up with that!???

  2. #2
    Join Date
    Feb 2009
    Location
    London
    Posts
    10
    I haven't had a problem with this before.

    in the select you arent rewriting the column for output e.g.

    Code:
    date_format(mix_date, '%m/%e/%Y') as mix_date
    if you are rename the output column, and order by the data column

    could you send me your whole query? so that I can cast an eye over it?

    - Joel

Similar Threads

  1. Date Query Problem
    By binarytrends in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 09 Jan 2006, 07:12 PM
  2. English Like Date Stored in MySQL
    By binarytrends in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 30 Oct 2005, 05:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •