The search expression is not quoted if you use join in the model
Steps To Reproduce:
$grid = new Grid(new Products());
$grid->model()
->join('product_prov as pv', 'pv.id', '=', 'products.provider_id')
->leftJoin('article_descs as ad', 'ad.article_n', '=', 'products.article_n')
->leftJoin('product_pictures as pp', 'pp.product_id', '=', 'products.product_id')
->select('products.*', 'pv.prefix', 'pp.filename', 'ad.description as ext_desc');
Use QuickSearch for find any text, and get SQL code like:
SELECT count(*) AS AGGREGATE
FROM `products`
INNER JOIN `product_prov` AS `pv` ON `pv`.`id` = `products`.`provider_id`
left JOIN `article_descs` AS `ad` ON `ad`.`article_n` = `products`.`article_n`
left JOIN `product_pictures` AS `pp` ON `pp`.`product_id` = `products`.`product_id`
WHERE (`name` LIKE %1000115% OR `article_n` LIKE %1000115% OR `product_code` LIKE %1000115% OR `description` LIKE %1000115%)
An expression like this is created, without quotes
Description:
The search expression is not quoted if you use join in the model
Steps To Reproduce:
Use QuickSearch for find any text, and get SQL code like:
An expression like this is created, without quotes