Hello,
First of all I'm creating a Line Chart with the Google Charts Visualization API and I'm using a MYSQL database.
In total I have two RPI's each of them have a UID, the first one has the value of '1' and the second one the value of '2'.
The RPI's collect temperature data and feed it to the database. After the data is collected I want to show tha data in a chart. The problem is I wrote a program in PHP to do that but the value's displayed isn't pricesely what I want so I think there is a small fault in my code, but I can't seem to find it.
The Values that actually should be inserted in the chart are:
{"cols":[{"label":"datetime","type":"datetime"},{"label":"RPI1","type":"number"},{"label":"RPI2","type":"number"}],"rows":[{"c":[{"v":"Date(2016, 11, 10, 15, 17, 3)"},{"v":"15"},{"v":"22"}]},{"c":[{"v":"Date(2016, 11, 12, 15, 17, 3)"},{"v":"27"},{"v":"25"}]}]}
I hope someone can help me?
Thanks in advance anyhow!
EDIT: the UID '3' shown in my database is ignored.
PHP File
First of all I'm creating a Line Chart with the Google Charts Visualization API and I'm using a MYSQL database.
In total I have two RPI's each of them have a UID, the first one has the value of '1' and the second one the value of '2'.
The RPI's collect temperature data and feed it to the database. After the data is collected I want to show tha data in a chart. The problem is I wrote a program in PHP to do that but the value's displayed isn't pricesely what I want so I think there is a small fault in my code, but I can't seem to find it.
The Values that actually should be inserted in the chart are:
{"cols":[{"label":"datetime","type":"datetime"},{"label":"RPI1","type":"number"},{"label":"RPI2","type":"number"}],"rows":[{"c":[{"v":"Date(2016, 11, 10, 15, 17, 3)"},{"v":"15"},{"v":"22"}]},{"c":[{"v":"Date(2016, 11, 12, 15, 17, 3)"},{"v":"27"},{"v":"25"}]}]}
I hope someone can help me?
Thanks in advance anyhow!
EDIT: the UID '3' shown in my database is ignored.
PHP File
Last edited by pspunabletohack,