I have a dataset of values from a MySQL table being returned which are then charted. Each of the data points should have a fixed time period between them, EG:
Data Point 1: 1 - Date/Time: 2013-02-11 09:00:00
Data Point 2: 2 - Date/Time: 2013-02-11 09:05:00
Data Point 3: 3 - Date/Time: 2013-02-11 09:10:00
However, this is not always the case. If we can provide our charting package with a set of data values, a start time and an interval time it can process and display the chart much quicker than if we provide a list of values and a list of dates/times.
What is the most efficient way to either pre-fill or post-fill a MySQL query with 0 values where the data point is missing? For example, using the data above if data point 2 was missing , what query could I use to get MySQL to return the following dataset:
Data Point 1: 1 - Date/Time: 2013-02-11 09:00:00
Data Point 2: 0 - Date/Time: 2013-02-11 09:05:00
Data Point 3: 3 - Date/Time: 2013-02-11 09:10:00
Thanks in advance