php - sorting database result object (array) according to months -


i have database has newsletter entries want arrange according months. db has following fields id, title, description , date. date has full date e.g. 2007-02-01 15:26:02. want arrange newsletters according corresponding month e.g want have this

november 2010
title of newsletter
title of newsletter
... till title of november 2010 newsletters printed out

december 2010
title of newsletter
... till title of november 2010 newsletters printed out

and on.

please me code achieve or give me idea on how go it.

select * db order month(date) 'd' desc group month(date) 

this query looking for, rest pretty basic php/sql should able guide or , apply it.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -