Reply to Re: MySQL inserting into multiple tables linked records

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация