[thelist] mysql: monthname results order
Ed McCarroll
Ed at ComSimplicity.com
Fri Mar 14 12:01:27 CST 2003
> SELECT DISTINCT MONTHNAME(date) AS month FROM date
> WHERE (date <> '0000-00-00') ORDER BY month ASC
> how can I return them in the correct calendar order?
Change the ORDER BY field to the (un-MONTHNAMEd) date.
SELECT DISTINCT MONTHNAME(date) AS month FROM date
WHERE (date <> '0000-00-00') ORDER BY date ASC
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ed McCarroll MailTo:Ed at ComSimplicity.com
ComSimplicity (310) 838-4330
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
More information about the thelist
mailing list