In Magento2, We can filter with MySQL FIND_IN_SET function. Magento2 have finset keyword to filter collection with comma separated column field value. For example If table column user_ids have string comma separated value like 1,5,69,89 and we want the record having 5 in user_ids field. Then follows the below example to get the match records: We created blog for collection filter with different type conditions.Magento2 addAttributeToFilter and addFieldToFilter Condition Types. I hope this blog is useful to Use MySQL FIND_IN_SET with collection in magento2.…
Magento2 in, we have collection of order. For some bussiness logic we need filter orders collection in specific date range in magento2.In this blog, I filter order collection in specific date range.Here we filter order created_at column in date range. We created blog for collection filter with different type conditions.Magento2 addAttributeToFilter and addFieldToFilter Condition Types. I hope this blog is useful to Get Orders Collection between a Date Range in magento2. In case, I missed…
Magento2 in we have collection of order, product, customer etc. For some bussiness logic we need filter collection with difeerent conditions to get data. In this blog we can see different type of condition for addAttributeToFilter and addFieldToFilter in magento2.We can use addAttributeToFilter and addFieldToFilter we below conditions.Here simple code of load product collection with addAttributeToFilter. Here mention all condition with sample code. Equal Value (eq) Not Equal Value (neq) Like Value (like) From Value…