Create google chart from mysql column with emphasis
I am generating google charts from different months of the year. Every month seems to work great except for the months (février) with emphasis. It has an error message that the column has no column. In the mysql table I have a column like this (1-févr), (2-févr) ... Is the accent the cause of the error? If so, how can I fix this? Thank you!
EDIT: I figured out that the problem was with JSON_encode and all I have to do is use the utf8_encode function on my data before converting it to JSON.
source to share
When choosing the shape of the column, the database uses backreferences around the column name, so the query would look like this before:
SELECT 1-févr, 2-févr FROM table
This needs to be changed:
SELECT `1-févr`, `2-févr` FROM table
Please be careful, these are backlinks, not quotes, that is, they are "and not" or ".
This ensures that the string evaluates as an integer and is not terminated by characters such as hyphens, etc.
source to share