Hi,
I'd like to have a dropdown-list with values from other tables. I am not sure how to do this and would appreciate your help.
My setup was like this
'values' => array(
'table' => 'Lookup_table1'
'column' => 'ID',
'description' => array(
'columns' => array('Field1','Field2'),
'divs' => array(' ')
)
)
But now I'd like to have 2 joined tables for lookup, can this be accomplished using 'joins'?
E.g.
To use several columns from Lookup_table as 'description' and one column from another table
Lookup_table1.ID (column),
Lookup_table1.Field1, (description)
Lookup_table1.Field2, (description)
Lookup_table2.Field3, (description)
WHERE
Lookup_table1.Foreign_ID=Lookup_table2.ID
is this possible?
I'd tried defining table aliases etc, but get errors. What to put in 'table' when it is not one single table?
thanks for your help!
|