* Rodney Broom
> From: Peter Sampson <[EMAIL PROTECTED]>
> > Select DISTINCT Month
> > FROM tblNews
> > 
> > The problem is that the months are shown alphabetical not in 
> > calendar order.
> 
> I'm assuming that your months are stored as names like:
> 
>   January, February, March
> 
> or
> 
>   Jan, Feb, Mar
> 
> 
> If so, I think that sorting in SQL will be a bit clunky. I would 
> advise either storing your dates as dates, or using an outside 
> program to sort your month names.
> 
> Of course, somebody else might know of something simple that I'm missing.

I guess this would be pretty simple:

Select DISTINCT Month
  FROM tblNews
  ORDER BY FIELD(Month,
    'Jan','Feb','Mar','Apr','May','Jun',
    'Jul','Aug','Sep','Oct','Nov','Dec')

-- 
Roger

---------------------------------------------------------------------
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

Reply via email to