This topic is locked

Master table

8/7/2008 1:28:38 AM
PHPRunner General questions
F
fryon author

I have maste table "company"

idNo, companyName
and a child table "orders"

id, orderNo, compName
When I tried to add into order table, the "compName" will be automatically filled with "companyName" showing the master details in the add page. Is this possible? <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=9215&image=1&table=forumtopics' class='bbc_emoticon' alt=':unsure:' />

J
Jane 8/7/2008

Hi,
I'm not sure that I understand you correctly.

Where and when do you want to show master info?

F
fryon author 8/7/2008

What I mean is that,
If i am going to add data in the orders table, the following data will be added:
id, orderNo, compName
The "compName" is automatically filled up. No need to select it from dropdown list. Since it is a master table.
Is this possible?

J
Jane 8/7/2008

Hi,
just set up master-detail relationships between Orders and company tables on the Datasource tables tab. Set up company tables as master, orders table as detail.

S
steveh 8/7/2008

Make sure you haven't deleted the conmtents of the default for that field on the add screen, that's where the linkage value comes from.