0

How to delete unused filter values in Opencart

How to delete unused filter values in Opencart

DELETE filter, filter_description FROM filter
LEFT JOIN filter_description ON filter_description.filter_id = filter.filter_id
WHERE filter.filter_id NOT IN (SELECT DISTINCT filter_id FROM product_filter)