You are here: Re: [PHP] Three queries. One Form. « PHP « IT news, forums, messages
Re: [PHP] Three queries. One Form.

Posted by Richard Davey on 10/20/42 11:18

Hello jack,

Friday, June 10, 2005, 12:05:35 AM, you wrote:

jj> I am trying to make one form on a single page insert info into three
jj> tables; query 1 creates an art_id (auto-increment) for the newly
jj> created row in table art;

jj> query2 creates a media_id in table media.

jj> Then I need to get the art_id and media_id created by the first two
jj> queries to insert into an intersection table as query three.

Assuming MySQL - just use 2 insert statements and after each one get
the last_insert_id. Once you've got both of those you can perform your
third and final insert using both of those values.

Best regards,

Richard Davey
--
http://www.launchcode.co.uk - PHP Development Services
"I do not fear computers. I fear the lack of them." - Isaac Asimov

 

Navigation:

[Reply to this 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

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