Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  Duplicate alias when using join table look up

phpMyEdit Features     Duplicate alias when using join table look up
Post new topic   Reply to topic    
 
vstsjfh     Joined: 23 Mar 2006   Posts: 6  
Post Posted: 2008-06-28 18:25
Back to top  Reply with quote     

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'
)
)
)

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy