I am trying to insert into two connected tables.
Table 1: workouts(id, ...) The id auto increments.
Table 2: customWorkouts(id, workoutID, ....)
But the thing is, the two tables are connected, customWorkouts.workoutID references workouts.id.
My question is, how can I execute two consequtive queries, the first creating a new workout and the second creating a related customWorkouts? How can I make the created customWorkouts instantly connected to the workout that I just created?