This topic is locked

How to get some data from Master table

11/12/2007 4:26:25 AM
PHPRunner General questions
A
amuro author

Hi,
There are two tables, master is _had, detail is _tnf, the foreign key is hadno.

At add page(_tnf), there are 3 columns that are the same as master table.

I hope when the user edit the add page, the page insert the 3 columns automatically.

So, the user doesn't enter data by hand.
Could anyone tell me, Thank you!

J
JColtro 11/12/2007

That idea contradicts the rules of modelling of data, because the details table should just repeat the field(s) that do part of the primary key of the main table. In the details table that field(s) represent the foreign key. I find easier to recover these data through a query using both tables instead of repeating the data in the details table.
JColtro