When having ONLY_FULL_GROUP_BY in your sql_mode in MySQL the report is not generated. (not the graph and not the table).
I see this error in my php error logging:
Uncaught mysqli_sql_exception: Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'mailscanner.mtalog.timestamp' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
I'm aware you can just change your sql_mode but a sql_mode can be set for a reason.
With these 2 simple changes the report works:
Add mailscanner.maillog.date to the GROUP BY of the first query
When having ONLY_FULL_GROUP_BY in your sql_mode in MySQL the report is not generated. (not the graph and not the table). I see this error in my php error logging:
Uncaught mysqli_sql_exception: Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'mailscanner.mtalog.timestamp' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
I'm aware you can just change your sql_mode but a sql_mode can be set for a reason.
With these 2 simple changes the report works:
https://github.com/mailwatch/MailWatch/blob/c3672e61b18c86ff41535274dd775bc44dd14a02/mailscanner/rep_total_mail_by_date.php#L113
Output looks exactly the same as if the mode was changed.