I'm an SQL newbie and I want to add data from a form into 3 different tables when the form is submitted.
I want to add data to a "Customers" table but I also want to add data to an "Orders" table that has a "Customer ID" I will only know the Customer ID after Ive added data to the "Customers" table. I also want to add data to another table "Extras" that will also require the Order ID from the "Orders" table. But again, I will only know that ID after the data has been added to the "Orders" Table.
I'm guessing that the process will be something like this
Insert [data] into Customers
Insert [data] into Orders including the Customer ID (the value of the Idenity from above)
Insert [data] into Extras including the Order ID (the value of the Idenity from above)
Can someone please elaborate or put me straight?