1
Fellow programmers, good evening. I’m having a hard time as build a chart of weekly records using PHP, Mysql and the Highcharts library.
I have records of connections and disconnections, which is saved in the format 2017-03-30 16:43:04, but in the line chart need to display this information in a 7-day period.
For example with the beginning of the week today: the axis of abscissas would contain 7 values 03/04, 04/04, 05/04, 06/04, 07/04, 08/04 and 09/04 and the ordinate axis would have integer values representing a certain amount of connection or disconnection.
I’m not getting to know how to mount this data on the backend side, mainly the SQL query.
Edit: I forgot to put the 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.
Imagery: