I have a MySQL table with data containing a date field. I need to take the start and last dates and list the months in the range. For example:
2007-08-01
2007-08-25
2007-09-15
2007-09-28
2007-10-06
2007-10-25
Would list:
Oct 2007
Sept 2007
Aug 2007
These will be links to a list of data from each month, so I think I need the year-month string (2007-08, 2007-09, etc) also.
Results are displayed on a PHP page. I'm not sure if it's best to handle this is the MySQL Query, or in the PHP page.
Please see my signature for MySQL and PHP versions.
Apache: 2.0.52 | MySQL: 4.1.20 | PHP: 4.3.9 | MS Access 2002 | WinXP SP2
2007-08-01
2007-08-25
2007-09-15
2007-09-28
2007-10-06
2007-10-25
Would list:
Oct 2007
Sept 2007
Aug 2007
These will be links to a list of data from each month, so I think I need the year-month string (2007-08, 2007-09, etc) also.
Results are displayed on a PHP page. I'm not sure if it's best to handle this is the MySQL Query, or in the PHP page.
Please see my signature for MySQL and PHP versions.
Apache: 2.0.52 | MySQL: 4.1.20 | PHP: 4.3.9 | MS Access 2002 | WinXP SP2