In attempoting to correct my output issue I have been trying to use json_encode() on the dataset resulting from my query. I can echo the data and it appears "correct" visually. But when I attempt to build a chart I get an error "Fatal error: SetDataValues(): Invalid data array (row 0) " I looked this up in the documentation and wasn;t sure of the underlying cause, but the comments referenced verison5.5 as having a fix. Here is what I have so far: $inc= $stmt->fetchAll(PDO::FETCH_ASSOC); $data = json_encode($inc);...
I am just starting with PHPlot. I have an application that would benefit greatly from adding charts to the reports currently being generated. First, I was looking for MySQL calls based on PDO. I have been able to pull data from my database using the fetchAll(PDO::FETCH_BOTH) command. But I am trying to build a stacked bar chart with days of the week as the x labels (text) and the sum of incidents (data) as the Y values. I was also trying to stack the values based on an incident code (text). The examples...