Query multiple rows that leads to one row in other table
I'm a noob at making mySQL queries so I couldn't get my work done. I hope
you guys know the answer to my question.
I want to make options to my products. Like if you have a black t-shirt,
with a tanktop model and diamonds on it. You must have the black t-shirt
tanktop model and diamonds row. I want to make it like this:
table: product_option
--------------------------------
product_option_id name product_combination_id
1 Black 1
2 Diamond 1
3 Tanktop 1
4 Option 2
5 Option 2
table: product_combination
--------------------------------
product_combination_id name
1 Black tanktop with diamonds
So my question is. Is it possible to query the product_options and get an
product_combination row out of it?
I hope you guys know the answer to my question! Thank you for your time :)
No comments:
Post a Comment