I need to modify a default prestashop db query. I've tried the following:

```
public function ajaxProcessCheckProductName()
{
    if ($this->tabAccess['view'] === '1')
    {
        $search = Tools::getValue('q'); /* in this variable, i wish subsitute the space with % */
        $searchmod = str_replace(" ", "%", $search);
        $id_lang = Tools::getValue('id_lang');
        $limit = Tools::getValue('limit');
        $result = Db::getInstance()->executeS('
            SELECT DISTINCT pl.`name`, p.`id_product`, pl.`id_shop`
            FROM `'._DB_PREFIX_.'product` p
            LEFT JOIN `'._DB_PREFIX_.'product_lang` pl
                ON (pl.`id_product` = p.`id_product` AND pl.`id_lang` = '.(int)$id_lang.')
            WHERE pl.`name` LIKE "%'.pSQL($searchmod).'%"
            GROUP BY pl.`id_product`
            LIMIT '.(int)$limit);
        die(Tools::jsonEncode($result));
    }
}

```

I wish replace the space in a variable, like `kawasaki racing filter` with %, so I can do a query on db with complete wildcards...

Example: a user search `kawasaki racing filter`, I wish replace it with `kawasaki%racing%filter` so, the query will be `%kawasaki%racing%filter%`...

Does the approach seem to be correct? It doesn't works right now :(

Can someone help me? Thanks in advance!