Forum Moderators: coopster
I would like to which mysql query & associated PHP codes to use if I like to list out the most recent 5 month of items in individual table seperated by months.
Here's the output I am lookin' for...
FEBRUARY 2004
----------------
x1 x2 x3
x4 x5 x6
JANUARY 2004
----------------
x1 x2 x3
x4 x5 x6
DECEMBER 2003
----------------
x1 x2 x3
x4 x5 x6
NOVEMBER 2003
----------------
x1 x2 x3
x4 x5 x6
OCTOBER 2003
----------------
x1 x2 x3
x4 x5 x6
I think I mostly need help on selecting by release month and seperating tables by months.
Thank much! You guys ROCK!
SELECT
MONTH(my_month_column) as my_month,
MONTHNAME(my_month_column) my_monthname
FROM table
WHERE MONTH(my_month_column) IN ($last_five_months)
;