Inserting data into multiple tables PHP MySQL
问题 I have a basic data structure for storing recipes. It consists of three tables as below: Table 1 - Recipes (recipe_id, recipe_name) Table 2 - Ingredients (ingredient_id, ingredient_name) Table 3 - Recipe_Ingredients (recipe_id, ingredient_id) I have come across a problem when adding a new recipe and would like to know the best practice for inserting. Currently, on submitting the form I insert into the Recipes table, the recipe_id is auto generated. I then insert into the Ingredients table,