Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Update Problem in Join table

phpMyEdit General     Update Problem in Join table
Odoslať novú tému   Odpovedať na tému    
 
minal     Založený: 26.08.2009   Príspevky: 2  
Príspevok Zaslal: 2009-08-26 13:03
Návrat hore  Odpovedať s citátom     

Hi

I want to update the rows of two tables which are joined by single coloumn 'Code'.
Problem is when i click on save it generates me the sql as :
Update maintable set Col1='123',
Col2='759745' where Code='111';

and gives me the error Col2 does not exist as col2 is present in JoinedTable.

My Code is:
--------------
$JoinTable='xyz';

$opts['fdd']['Col2'] = array(
'name' => 'Col2',
'select' => 'D',
'maxlen' => 20,
'sort' => true ,
'sql'=>'PMEjoin7.Col2',

);

$opts['fdd']['Col2']['values']['table'] = $JoinTable;
$opts['fdd']['Col2']['values']['column'] = 'code';
$opts['fdd']['Col2']['values']['description'] = 'Col2';
$opts['fdd']['Col2']['values']['join']= 'PMEtable0.code=PMEjoin7.code';

Please let me know how can i update the rows of two diferent tables joined by single column.

Thanks

 
doug     Založený: 10.02.2003   Príspevky: 1013   Bydlisko: Denver, Colorado (USA)
Príspevok Zaslal: 2009-08-29 14:59
Návrat hore  Odpovedať s citátom     

"If" this can be done with phpMyEdit, it would almost certainly have to be done using a trigger which you would have to create.

 
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