arranging mysql data

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
sukanya.paul
Forum Newbie
Posts: 9
Joined: Tue Dec 02, 2008 4:16 am

arranging mysql data

Post by sukanya.paul »

hi i have a table which has a field called month whose values are
January,February,March etc in no particular order

i am selecting all daya from this table and the month values are in the following order:
January
November
December
February
March
April
May
June
July
August
September
October

i want it to be displayed in the proper order
January
February
March
..
..
..
December

Can some1 please help me with this.
Thanks in advance
Suk
User avatar
Salaria
Forum Commoner
Posts: 34
Joined: Fri Feb 13, 2009 2:50 am
Location: India
Contact:

Re: arranging mysql data

Post by Salaria »

Hi,

Add an orderid field in a table or Insert values sequentially with ids and select sorted data using id.

I think this will help.
Post Reply