This query lists older dates than the last items entered, can anybody tell me why?
SELECT CATEGORY,SUBCATEGORY,DESCRIPTION FROM ITEMS ORDER BY DATE DESC LIMIT 5
Hmmm, what is the format/type of your DATE field?
VARCHAR, does it need to be in DATE?
pp
That depends. What format is the date in?
If it's something like:
Jan 1, 1999 12:33 pm
Then it won't sort properly. To sort a date properly it would have to be in this order:
YYYYMMDDHHMMSS
Or you could use a unix timestamp or one of the mysql date/time datatypes. Sounds like the DATETIME datatype would suit you best.