I have this 3 tables.
Employee
PK : id
name
completedBy
FK : employee_id
FK : order_id
Order
PK : id
date
I created form for creating order where i fill infos of order (date) and who completed order. In my form there is a table from which I select the employee and get his id. I want to know if there is possible to insert into tables Order and completedBy with one single query.
Is there any difference in effectivity between using two inserts or using the code in answer ?