Posted by monomaniac21 on 06/02/06 15:38
Thanks for the response Marcin but i still dont quite understand. could
you be any more elaborate please. Sorry.
Marcin Dobrucki wrote:
> monomaniac21 wrote:
> > Hi all
> >
> > Using MySQL can anyone tell me how to most efficiently insert a collumn
> > in 'table1' retrieve the id from this record and insert mutliple
> > records into 'table2' with a collumn for the id in 'table1' which links
> > the two recordsets
>
> set auto_commit=0
> insert into foo values (...)
> select last_insert_id()
> insert into bar values (....)
> set auto_commit=1
Navigation:
[Reply to this message]
|