bridge tables
Posted by: themrweaver
Date: November 15, 2006 10:36PM

I have created bridge tables, I have assigned all of the foreign keys that I need to have. But, when I enter data into the two separate tables, the IDs do not get entered into the bridge table.

Here's an example of my tables

Author table:
author_id (Primary Key)
author_name

book table:
book_id (Primary Key)
book_title

bridge table
author_id
book_id

In the bridge table, both fields have been assigned as foreign keys referencing the appropriate fields in the other tables with "UPDATE ON CASCADE" added to each foreign key statement.

Both fields in the bridge table have been made into a composite Primary key.

I have an HTML form linked to a PHP file for allowing authors and book titles to be added to the database. The forms work just fine, but I cannot get the form to capture the author_id and book_id data and added to the bridge table.

Any help would be appreciated.



Edited 1 time(s). Last edit at 11/15/2006 10:40PM by themrweaver.

Options: ReplyQuote


Subject
Written By
Posted
bridge tables
November 15, 2006 10:36PM
November 30, 2006 05:41PM
January 03, 2007 01:33PM


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.