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.

http://www.mysql.com/doc/en/Date_and_time_functions.html

----- Original Message -----
From: "Tyler Durdin" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
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
php,
> 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
get
> it to order the months by their numbers starting with january (1) and
going
> 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*
> http://join.msn.com/?page=features/junkmail
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to