I've used the "twilfong" patch patched again with "vstsjfh" patch, it works fine not only with 3 tables but with four, you
can see it in the example that follows.
It works fine while I use only one field (fk_t1_id) for a drop down menu selection using table look up join, as I said
with a four tables join.
When I add a second field (fk_t1_id2) for a drop down menu selection using table look up join with two new tables join,
the alias name of the last two tables step on the last two alias of the first field, then MySQL sets an error of
duplicate alias.
What I'm doing wrong?, Is there a bug in the code for this approach or I'm trying to do something that is not possible?.
Example:
$opts['fdd']['fk_t1_id'] = array(
'name' => 'fk_t1_id',
'select' => 'T',
'values' => array(
'table' => 't1',
'column' => 'id',
'description' => array(
'columns' => array('fk_t2id','fk_t3id','fk_t4id',fk_t5id'), <==== works fine when no more fields use join feature
'divs' => array('-'),
'values' => array(
array (
'table' => 't2',
'column' => 'id',
'description' => 'name_t2'
),
array (
'table' => 't3',
'column' => 'id',
'description' => 'name_t3'
),
array (
'table' => 't4',
'column' => 'id',
'description' => 'name_t4'
),
array (
'table' => 't5',
'column' => 'id',
'description' => 'name_t5'
)
)
)
)
);
$opts['fdd']['fk_t1_id2'] = array(
'name' => 'fk_t1_id2',
'select' => 'T',
'values' => array(
'table' => 't1',
'column' => 'id2',
'description' => array(
'columns' => array('fk_t6id','fk_t7id'), <==== doesn't work, duplicate alias for the two tables, same alias as t4
and t5 .
'divs' => array('-'),
'values' => array(
array (
'table' => 't6',
'column' => 'id',
'description' => 'name_t6'
),
array (
'table' => 't7',
'column' => 'id',
'description' => 'name_t7'
)
)
)
|