php - How to display data grouping by date? -


i have rows in mysql data base field datetime. how can display data on page grouping date?

for example 2 rows have same date: 2015-09-14 how can show these as:

09 september row 1 row 2 

in query should order datetime field , in application logic i'd go with:

foreach(rows row){   if(previous date != date of row){     output date   }   output row    previous date = date of row } 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -