Assuming Month_Start is stored in MySQL date format (yyyy-mm-dd) you could
Select blah blah From blah Order By DATE_FORMAT(Month_Start,%m) ASC
The %m will pad on the zeroes.

----- Original Message -----
From: "Tyler Durdin" <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Monday, March 31, 2003 1:53 PM
Subject: php and mysql

> I have a db with events in it. i would like to pull the events out via
> but i would like them to be ordered by month number (1-12). When I do this
> (Select blah blah From blah Order By Month_Start ASC) it orders the months
> by number, but it starts with october (month 10) I am pretty sure it is
> doing this because I have no events until april (month 4). So how can i
> it to order the months by their numbers starting with january (1) and
> to december (12) even if I do not have events until april (4)?
> _________________________________________________________________
> The new MSN 8: advanced junk mail protection and 2 months FREE*

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to