Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Problem with three tables relations

phpMyEdit General     Problem with three tables relations
Odoslať novú tému   Odpovedať na tému    
 
sidney     Založený: 09.08.2004   Príspevky: 2  
Príspevok Zaslal: 2004-08-12 13:35
Návrat hore  Odpovedať s citátom     

Hi everybody,
I'm working for a NGO and I'm using phpmyedit 5.4 to develop a system for managing projects' data stored in Mysql tables.
I have 3 tables (actually they are more but my problem is concerning a three tables relationship)

table1 (partner)
partner_id
partner_name
etc...

table2 (projects)
project_id
project_name
partner_id (from table1)

table3(project+partner)
table3_id
project_id
partner_id

Table3 keeps the relation (wich is many to many) between patrners and projects. A project may have more than one partner and one partner can partecipate to more than one project.
My problem is how to populate and update table3 when inserting, updating or deleting data from the other tables.
I've read the documentation and the forum but I really didnt see any solution.
I'm starting to believe I should use trigger but didnt understand clearly how this should work.
Could someone please give me advice on this topic?
Thank you very much

Giovanna

 
ajh     Založený: 17.12.2003   Príspevky: 236  
Príspevok Zaslal: 2004-08-12 13:56
Návrat hore  Odpovedať s citátom     

I think that you will need three forms here.

1. Partner maintenance
2. Project maintenance
3. Partner/Project assignment

1 and 2 are straightforward single table PME forms.

3 is a little more complicated as you will need to use the 'values' option on both the partner and the project fields to list the valid options.

 
sidney     Založený: 09.08.2004   Príspevky: 2  
Príspevok Zaslal: 2004-08-12 14:13
Návrat hore  Odpovedať s citátom     

ajh Napísal:
I think that you will need three forms here.

1. Partner maintenance
2. Project maintenance
3. Partner/Project assignment

1 and 2 are straightforward single table PME forms.

3 is a little more complicated as you will need to use the 'values' option on both the partner and the project fields to list the valid options.


I've build a form for partner wich insert,update, etc data in table 'partner' but I was thinking about doing step 2 and 3 at the same time, that is when I insert project's data.
A third form could also be a solution but I still cant see how to build it in a way that insert or update data without human intervention.

Giovanna

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov