I have table configuration where I need to create a parent record in one table and then create multiple child records in other tables linked by a foreign key.
when the 1st set of records is created, there is only one child record in each child table, so I'd like to be able to do something like this
INSERT INTO header SET foo=5, default_child=(INSERT INTO child_table SET bar=9)
and have the auto increment value for the child_table be returned and inserted into the default_child field. Is there any way to do this?