There is a SearchModel , there is a query $query = Table::find(); Data comes from the frontend in the $name variable and it needs to be added to the request.
if($this->name) { $query->andWhere("MATCH(name) AGAINST (:query IN BOOLEAN MODE)", [':query' => str_replace(' ', '*', trim($this->name)) . '*']); } As I understand it, this format is not correct, it may be a "hole" in security.
How to safely insert variables with data in the query?
'- user3841429