List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 20 2002 6:12pm
Subject:Re: x-ref insert from within an insert. . .select
View as plain text  
At 11:42 -0500 3/20/02, Andrew Hazen wrote:
>Hi,
>I am loading table A from values in table B with an insert . . . select
>statement.
>I also need to populate a x-ref table with the new insert ids from the
>insert . . . select.
>
>I know in Oracle I would put a trigger in to do the x-ref insert after
>each row of the insert. . .select is processed.
>
>Is there anyway to do this in mysql/php?

Yes, you do it yourself. :-)

You'll probably find the PHP mysql_insert_id() function helpful in
your situation.

>
>
>Spamfilter: mysql
>
>Andrew Hazen
>Database Developer
>Jatech Solutions Inc.
>160 Bartley Drive
>Toronto, ON
>M4A 1E1
>www.jatech.ca
>416-288-9833
>

Thread
x-ref insert from within an insert. . .selectAndrew Hazen20 Mar
  • Re: x-ref insert from within an insert. . .selectPaul DuBois20 Mar
    • RE: x-ref insert from within an insert. . .selectAndrew Hazen20 Mar