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
Post a Comment