Re: Insert into multiple tables using auto_increment reference

2007-06-11 Thread Hamish Allan
On 6/11/07, Baron Schwartz <[EMAIL PROTECTED]> wrote: Hi, Hamish Allan wrote: > Hi, > > Is it possible to insert values into two tables simultaneously and > have the value of one of the columns in the second table be the > auto_increment value from inserting into the first? No, because you can

Re: Insert into multiple tables using auto_increment reference

2007-06-11 Thread Baron Schwartz
Hi, Hamish Allan wrote: Hi, Is it possible to insert values into two tables simultaneously and have the value of one of the columns in the second table be the auto_increment value from inserting into the first? No, because you can only insert into one table at a time. But you can write a sto

Insert into multiple tables using auto_increment reference

2007-06-11 Thread Hamish Allan
Hi, Is it possible to insert values into two tables simultaneously and have the value of one of the columns in the second table be the auto_increment value from inserting into the first? E.g. if table1 has an auto_increment column c1, the logic I'm looking for would be something like: INSERT IN