| Index
» Projekty
» phpMyEdit
» Fórum
» Update Problem in Join table |
 |
minal
Založený: 26.08.2009
Príspevky: 2
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)
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
|
|
|
|