I have three tables:
* products (prodId, prodName, description, price)
* classifications (classId, className)
* junctions (prodId, classId)
The products table stores the details of various t-shirts.
The classifications table stores all of the differant attributes that a t-shirt might have. For example: Small, Medium, Large, Black, White, Blue, Pink, V-neck, Round neck, Short sleeved, Long sleeved etc.
The junctions table sets up a many-to-many relationship between products and classifications. The idea is that any given t-shirt in the products table could have any number of the attributes in the classifications table. For example, one t-shirt could be available in two different sizes and three different colors.
I want to set up a system so that the user can choose a range of classifications, and then filter the products table accordingly to show which t-shirts match their criteria. A typical requirement might be:
Large and (White or Pink) and V-neck
Any suggestions? I have everything else set up fine, I'm just struggling with formulating an SQL SELECT statement to do the query.