I have 3 tables, TableA, TableB and TableAB (many to many table).
See example of TableAB below:
TableAB
id_attribute | id_product_attribute
14 | 18
14 | 19
16 | 10
16 | 12
16 | 16
16 | 18
16 | 20
16 | 22
16 | 24
16 | 26
In this table, I have id_attribute from TableA and id_product_attribute from TableB.
If I want to find out the id_product_attribute that has both id_attributes 14 and 16, how should I do it?
Essentially, I have a combination of id_attributes and I am looking for a specific id_product_attribute that contains all of them.
In the example above, only product_attribute 18 has both attributes 14 and 16. My first query will find out all the attributes. This problem I have now is to determine which product attribute it is from this table.
Thanks.