Many to many relationship data
Posted by: Jai Pierce
Date: October 03, 2007 02:46PM

Hi again all
I have two many to many tables that are connected with an intermediate table that takes the primary key from the two tables to form 2 one to many relationships. What I want to know is how do I automate the input of the two primary keys into this third table. Is this done using PHP, do I find the last ID of both tables and add 1 to this and save in the third table. Or is there a better way or just a right way.

===========
TABLE 1
tble1_ID int
details char
.....
.....
etc
===========

===========
TABLE 2
tble2_ID int
details char
......
......
etc
===========

===========
TABLE 3
tble1_ID
tble2_ID
===========

I need to automate the data input for table 3 from both table 1 and table 2.

Many thanks again in advance

Jai

www.riot-ink.com

Bringing The Tattoo To You!!!!

Options: ReplyQuote


Subject
Written By
Posted
Many to many relationship data
October 03, 2007 02:46PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.