Answer the question
In order to leave comments, you need to log in
How to write a query for a filter?
There is a site filter.
Filters are grouped into groups, visually displayed how it should work:
that is, logically, there should be such a condition:
WHERE (shop_products_filter.filter_id=14 OR shop_products_filter.filter_id=15)
AND (shop_products_filter.filter_id=18 OR shop_products_filter.filter_id=19)
The entire request
SELECT *
FROM products
LEFT JOIN shop_products_filter ON products.id=shop_products_filter.product_id
WHERE (shop_products_filter.filter_id=14 OR shop_products_filter.filter_id=15)
AND (shop_products_filter.filter_id=18 OR shop_products_filter.filter_id=19)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question