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

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e517a2-45115.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e517a2-45115.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?