| Index
» Projekty
» phpMyEdit
» Fórum
» Nested join? |
 |
vstsjfh
Založený: 23.03.2006
Príspevky: 6
Zaslal: 2008-06-30 21:56
Návrat hore
Odpovedať s citátom
|
I have the following three tables:
1 - Functions:
function_id
function_name
department_id
function_desc
2 - Departments
department_id
company_id
department_name
3 - Companies:
company_id
company_name
I would like to show the following information:
function_name*function_desc*company_name*department_name.
How can I get this, I've tried several ways but none works.
I use a drop-down menu options with table look-up.
From the main table, Functions, I obtain: function name, department name, but I'm not able to obtain company name from table Companies that isn't directly related to Functions but through Departments table.
Can anyone help me? Thanks.
|
michal
Založený: 17.06.2003
Príspevky: 537
Bydlisko: Slovakia
Zaslal: 2008-07-08 02:12
Návrat hore
Odpovedať s citátom
|
internally pme join tables are addressed as PMEjoin3 (or so)
you can make an extra field with sql function like "concat(PMEjoin1.field1, PMEjoin2.field2)"
beware the numbers will change when you alter your pme config
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|