Answer the question
In order to leave comments, you need to log in
How to link recipe and products?
Good afternoon.
I have a problem with creating tables, namely I don't understand how to link them.
There are 2 tables - in the 1st the names of the products, in the 2nd the names of the recipes.
It is necessary to somehow link the recipe and a certain number of products. How can I do that?
Answer the question
In order to leave comments, you need to log in
Read about table relationships, in particular ManyToMany. More specifically, another table is created, say, RelationsRecipeProduct, which will contain only 2 fields - idRecipe and idProduct. Then, with the help of joins, data from 3 tables is picked up and voila!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question