This topic is locked

Many2many relation - hide redundant field

3/8/2009 6:09:31 PM
PHPRunner General questions
C
cleao author

Hi,
I have 3 tables: Companies, Directors and Persons

I have a relation of many-to-many between companies and persons.
When i'm listing/editing/Adding the details of Persons or Companies I don't want to see/manage the master key field! I want o see which Directors each company has and for each Person in which Companies he is Director.
Thank you!

J
Jane 3/11/2009

Hi,
how are Companies, Directors tables connected? Please give me more detailed description of what you want to achieve.

C
cleao author 3/11/2009

Hi,

how are Companies, Directors tables connected? Please give me more detailed description of what you want to achieve.


Hi Jane,

Thank you for your reply!
I'm exploring the capacities of PHPR and I searched the Forum to figure out how to deal with a many-to-many relation! I wat to add Directors to Companies without indicating the Company, because this is the master table! The same for Persons; Each Director is catalogued as a person, and when I access the record I want to see which are the companies in which he is a Director (has shares). In Each view I don't want to see the column (field) related to the master table!
I hope this helps!
Thank you.

Sousa

J
Jane 3/12/2009

Hi,
I suppose you want to select values from two tables in your lookup.

In general it's not possible.
You can publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages and I'll try to help you.

C
cleao author 3/13/2009

Hi,

I suppose you want to select values from two tables in your lookup.

In general it's not possible.
You can publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages and I'll try to help you.


Hi Jane,
Sorry, I'm not explaining myself quite well.

When i'm in the page with the MAster-detail relation, I don't want to manage in the detail table the foreign key of the Master table. When I add a Director I don't want indicate the Company because it is implicit. So, I want to hide the Company key field in the details table, but when I'm inserting a new row to the details table I want to put on the new record the foreign key of the masters table. The regular procedure when we are dealing with master-detail views.
Thanks.