I want to insert into two tables. I want to insert a name in to 'Names' and then insert a DVD into 'DVDs', using the id of the name inserted into 'Names'.
Names
id | name
1 | john
DVDs
id | title | user_id
1 | Star Wars| 1
Updating the DVDs table depends on the insert id of the first insert.
Is there a way to do this in one query or would it need separating in to two quires?