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  »  'join' option question

phpMyEdit General     'join' option question
Post new topic   Reply to topic    
 
michal     Joined: 17 Jun 2003   Posts: 537   Location: Slovakia
Post Posted: 2004-09-16 09:00
Back to top  Reply with quote     

well, isn't 'values' option sufficient? (and create dummy field for article.title_id using 'sql', if needed). or i misunderstood something ?

 
hbernard     Joined: 23 Mar 2003   Posts: 159   Location: FRANCE
Post Posted: 2004-11-08 22:33
Back to top  Reply with quote     

Doug,

- you can't use $main_column in a dummy field (yes, stating the obvious, but, in case of ...
- try to use 'join' without var substitution :
something like :
PMEtable0.my_main_column = PMEjoin4.my_join_column
- don't forget :
You have to set both
['values']['column'] AND ['values']['description']
even if they have the same values (see #220)
- You should read :
#220
and
#272

I will try to build an example for your schema.

_________________
hbernard - phpMyEdit updater.
 
hbernard     Joined: 23 Mar 2003   Posts: 159   Location: FRANCE
Post Posted: 2004-11-08 22:54
Back to top  Reply with quote     

This works for me when I insert it at the top of field definition.

Don't move 'join0' and 'join1' (they don't display anything, but their respective position are important for PMEjoinX numbering.

You may put the field 'a_field_from_author' anywhere you want...

Or did I miss something ?

Code:
$opts['fdd']['join0'] = array(
  'options'  => '',
   'input' => 'VR',
   'values'   => Array(
      'table' => 'author_links',
      'column' => 'title_id',
      'description' => 'title_id',
      'join' => '$main_table.title_id = $join_table.title_id')
);

$opts['fdd']['join1'] = array(
  'options'  => '',
   'input' => 'VR',
   'values'   => Array(
      'table' => 'author',
      'column' => 'author_id',
      'description' => 'author_id',
      'join' => 'PMEjoin0.author_id = $join_table.author_id')
);

$opts['fdd']['a_field_from_author'] = array(
   'name'  => 'Author Name',
   'input' => 'VR',
   'options'  => 'LFV',
   'sql' => 'PMEjoin1.name'
);


_________________
hbernard - phpMyEdit updater.
 
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