mysql - Finding all other Objects with same Joined Attributes -


I have a product table, and then the product type and product option tables (include in tables for other tables).

Looking at one product, I want to find all other products where the product's options (i.e., ProductOptions.product_id == product.id) and ProductTypes are the same.

Most Well we can get all the product type and product options, then to find the ID == id to join the table for each; But it seems irreversible and we feel that one way to do this should be a bit clearer.

How would you find other products where all the options and types included in the original product match?

using Rail 3.x / ruby ​​1.9.3.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -