I'm not sure if I'm overcomplicating this or whether I can't see the wood for the trees.
I have two tables, both have auto incrementing ID's.
Table 1: ID - auto field - int other field - varchar Table 2: ID - auto Table1Id - FK field - varchar
the first table stores an article and the 2nd stores the location of the images related to it.
For my form that uploads the data all information to be stored is taken. I need to run two inserts simultaneously (which I realise is daft) using the same ID.
My plan(flawed) is to insert into table 1, get the id and then insert into table 2.
one of the problems if is a user accesses the site in the gap between the two inserts and sees a mess.
is there an easier way, I think I've made a mistake or I'm missing something obvious as it shouldn't be this difficult. :)