MySQL – fill missing dates

I have this query and I want to fill missing dates with some values (zero for example…) SELECT date, SUM(val1) as sum_val FROM table1 WHERE date BETWEEN '2016-03-04' AND '2016-03-10' GROUP BY date Here is result: |————————– |date, sum_val |————————– |2016-03-04, 21568 |————————– |2016-03-05, 14789 |————————– |2016-03-08, 20568 |————————– |2016-03-10, 5841 |————————– How can I … Read more

Unable To fetch data from database to script tag while using graph

plotOptions: { column: { pointPadding: 0.2, borderWidth: 0 } }, series: [{ name: 'Not Completed', data: [<?php echo json_encode($TotalNotCompleted); ?>] /* here how to write query to fetch data from database, to make my graph work dynamically */ }, { name: 'Completed', data: [<?php echo json_encode($TotalCompleted); ?>] }] Answers: Thank you for visiting the Q&A … Read more