| Index
» Projects
» phpMyEdit
» Forum
» Update Problem in Join table |
 |
minal
Joined: 26 Aug 2009
Posts: 2
Posted: 2009-08-26 13:03
Back to top
Reply with quote
|
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
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2009-08-29 14:59
Back to top
Reply with quote
|
"If" this can be done with phpMyEdit, it would almost certainly have to be done using a trigger which you would have to create.
|
|
Post new topic
Reply to topic
|
|
|
|