Hi I have two tables in a parent - child relationship and I'd like to be able to insert to them both with a single query. If that isn't possible please just say so, if it is possible let me know! Here are what my tables look like...
I want to be able to insert the data into the parent and then take the unique key id from that and place it into the child table along with any other data. I can see how this can be done in two queries, however it seems like two queries is a lot, especially considering this is a frequently run insert. So, is there any way to somehow get the inserted rows id from the parent table and push it into the child table all in one step?
Inserting linked data into multiple tables at once
1 reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users