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  »  Update Problem in Join table

phpMyEdit General     Update Problem in Join table
Post new topic   Reply to topic    
 
minal     Joined: 26 Aug 2009   Posts: 2  
Post 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)
Post 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    

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