Colleagues programmers, good night. I'm having a hard time setting up a chart of weekly records using PHP, MySQL, and the Highcharts library.
I have records of connections and disconnections, in which it is saved in 2017-03-30 16:43:04 format, but in the line graph I need to display this information within a 7 day period.
For example with the beginning of the week today: the abscissa axis would contain 7 values 03/04, 04/04, 04/04, 06/04, 07/04, 08/04 and 09 / 04 and the y-axis would have integer values representing a certain amount of connection or disconnection.
I can not figure out how to mount this data on the backend side, especially the SQL query.
Edit: I forgot to put image and table data ...
Table columns:
id | username | event | date
Where id is the event id, username the user name, event can assume connection or disconnection values and date is the date in the format 2017-03-30 16:43:04 .
Image: