I have a array i.e.
$frame = Array(
[0]=1,
[1]=2,
[2]=4
);
and I want to get value form table "standard_product" where "frame_category" is a column name, this column value are look like
frame_category
4,7
1,3,4
6,7,8
return all row if any value of $frame match with any value of frame_category column. Here require result is:
4,7
1,3,4
My effort to resolve this is:
Standard_product::Where('frame_category', 'LIKE', '%' . $frame . '%')->get()->toArray();
(SELECT * FROM `standard_products` WHERE `frame_category` LIKE "%".$frame."%");
but i will not return expected result. Please help me.
14,42, etc as well as those that match4.... and as the db can't use indexes for this type of search, it won't ever be a fast query