Folks, I am looking for the best way to retrieve following information. I got a table with products and options assigned to them. Then I got a list of option combinations and wanting to know the existence of products for my combinations.
product to option table
- p1 - option1
- p1 - option2
- p1 - option3
- p2 - option2
- p2 - option3
- p3 - option3
- p3 - option4
My option combinations are [option1,option2], [option1,option4], [option2,option4] and [option3,option4]
My expected result is [option1,option2] and [option3,option4]
-The selection is based on, there should be at least one product associated with all the options in a combination. Here [option1, option2] is associated to p1 and [option3,option4] associated to p3. If the combination is distributed among multiple products then that combination will not be selected. Also there could be n number of options in a combination.
Gracias de antemano!
preguntado el 05 de mayo de 13 a las 18:05