How to query jsonized fields in mysql

After

Chinese jsonization is saved in the database, it becomes the format of "ud83dudea3u5357u6d77"
clipboard.png
.
now I want to blur the query, but name like can"t find it in "Chinese". Is there any function to handle?.

Oct.21,2021

you can ask json_encode not to format Chinese

echo json_encode("", JSON_UNESCAPED_UNICODE);

make Json understand Chinese (JSON_UNESCAPED_UNICODE)


PHP MySql fuzzy query json data

generally, data in json format will be specially processed in Chinese, so it needs to be processed when querying

.

$name = "Le Yangjun";

$json_name=str_replace ("\\", "_", json_encode ($name));

)

$where. = "and extend_params like'%". $json_name. "%';

The

eg: statement comes out in this format: select * from user where name like'% "_ u533b_u6e21_u4e913"%

this allows you to query data stored in mysql in json format

Menu