I have following table given below:
id_attribute id_product_attribute
1 1
13 1
4 2
13 2
I want to fetch id_product_attribute
which have id_attribute
1
and 13
.
My query is given below:
SELECT id_product_attribute
FROM ps_product_attribute_combination
WHERE id_product_attribute = 1
AND id_attribute IN (1,13)
GROUP
BY id_product_attribute
The above query is also returning the id_product_attribute
2
as well instead of only 1
. How can I achieve this?
Can anyone please help to resolve this problem?
Thanks in Advance!