1: Brand/manufacturer
2: Colour (its a product option)
3: Size (also a product option)
Customers see three dropdowns and with those filter the product in a category.
I managed to combine Brand with either Colour or Size but not the three filters together. The reason is that Colour and Size are both attributes from the same table. Therefore I need a little help with the following sql statement to have all three filters work together
$where = 'pa.products_id = p.products_id and (pa.options_values_id = \''.$var1.'\' where pa.options_id = \'1\') and pa.options_values_id = \''.$var2.'\' where pa.options_id = \'2\')';
The $var1 and $var2 work I just need to know how to double select on pa.options_values_id. So first of all $var1 corresponds with pa.options_values_id=1 and $var2 corresponds with pa.options_values_id=2. My where statement doesnt work because it involves more than one 'where' but how do I get this to work?
Thanks in advance.














