How would you group a range of dates into days (with PHP, no 5.3 available at the moment for use of DateTime by the way)? I’ve read out all data entries via MySQL for a month and now want to calculate how many data entries have been created in each day of the month, timestamp is default like 2011-11-05 23:42:03.
How would you group a range of dates into days (with PHP, no 5.3
Share
Assuming
timstampis the name of your column, useDATE()to extract only the date part. Group by the extracted date to form your aggregate: