in a mysql insert request i used ($text
being sent by $_POST
and column MESSAGE
being of JSON format) :
$data = '{"mytext":".'$text'."}';
INSERT INTO xxxxx (MESSAGE) VALUES('$mytext');
i was stuck with the following problem :
Some smiley are displaying ok, but some with a "?"
I searched here for an answer and found that utf8mb4 must be set on the database, tables and columns.
The problem is when i try the following which contains my registered message:
ALTER TABLE xxxxx CHANGE column_name column_name JSON CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Result of the above
You have an error in your SQL syntax;
I assume that it is only possible on Varchar()
column.
Do you have any idea on how i can make this work ?
Thank you