Php libchart with value from my custom table
Looking at the error msg, I think the code needs to be adapted, so that the current string (as it is now in the error message) like BETWEEN 01-10-2014 18:39:52 AND 01-10-2014 19:39:52 is replaced by BETWEEN "01-10-2014 18:39:52" AND "01-10-2014 19:39:52". So basically prepend and append a " to the variables $prev_date and $next_date ...

What isn't clear to me in this question though:


What is that 'libchart' in the title of this question?
What's the purpose of the $chart in your code? If it is because you're using some charting module, it'd be interesting to know which module you're using, and you might want to add the charts tag to this question also ...