在json上还有什么地方?

I want done "HAVING" for value json that store in database with json_encode, this values is persian word but but not done "HAVING" for it, how is fix it?

row_s is as:

row_s id 1: ["All5","\u0648\u06cc\u0632\u0627 8"]
row_s id 2: ["All5","\u0648\u06cc\u0632\u0627 7"]
row_s id 3: ["All5","\u0648\u06cc\u0632\u0627 6"]

This is my php code:(output it is: There is not)

$val   = 'ویزا 8';
$query = $this->db->query('SELECT * FROM table HAVING row_s LIKE "%' . $val . '%"');
if ($query->num_rows() > 0) {
    foreach ($query->result() as $val) {
        echo $val->name . '<br>';
    }
} else {
    echo 'There is not';
}

Update: Can where value “$val” that is number or latin word with value json in database, but can not for persian word.

for example, following code have output, and is $query->num_rows()=3.

$val   = 'All5';
$query = $this->db->query('SELECT * FROM table HAVING row_s LIKE "%' . $val . '%"');
if ($query->num_rows() > 0) {
    foreach ($query->result() as $val) {
        echo $val->name . '<br>';
    }
} else {
    echo 'There is not';
} 

You have stored a json string into your database. Doing so, is just storing text into the database.

SQL is a language to query (and more) the database, e.g. to select text fields from the database.

But SQL does not know about json, especially, the LIKE keyword is not able to parse your json and then apply it's regular, text based pattern matching on it.

You need to either store your data in plain text (across multiple columns) or you need to query all fields and then use PHP to search through your data.

A third alternative is to extend your database server to understand json and to provide a function that allows you to search in json encoded data similar to LIKE.

However, infact you have just created a database inside the database which comes with the price like the problem you're now facing to select the data you want.