In my localhost
I have Mysql 5.7 and in my server I have MariaDB 10.2.7 .
I have some json
fields and I want sort my records by one of fields in json
values, I search in google and stackoverflow and so I use this query :
SELECT id , CONVERT(JSON_EXTRACT(name, '$."fa-IR"') USING utf8) COLLATE utf8_persian_ci AS cName FROM `users` ORDER BY cName ASC
Sample Data:
id | Name
-----+-------------------
1 | {"fa-IR":"\u062a\u0633\u062a","en-US":"Test"}
This function work without any problem in my localhost (MySQL) but not work in server (MariaDB) I mean my records cannot sort properly and show broken up !