Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Sobota, 28. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Duplicate alias when using join table look up

phpMyEdit Features     Duplicate alias when using join table look up
Odoslať novú tému   Odpovedať na tému    
 
vstsjfh     Založený: 23.03.2006   Príspevky: 6  
Príspevok Zaslal: 2008-06-28 18:25
Návrat hore  Odpovedať s citátom     

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

 
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