Posted by Marcin Dobrucki on 06/02/06 12:49
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
[Back to original message]
|