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  »  Making an upload URL link

phpMyEdit General     Making an upload URL link
Post new topic   Reply to topic    
 
texasnerd     Joined: 09 Jun 2009   Posts: 2  
Post Posted: 2009-06-12 19:35
Back to top  Reply with quote     

I am posting this to show a clearer description of how to join two tables and have an upload link. I am a beginner and I would have appreciated this spelled out for me. SQL CONCAT may be used in place of URL to build a link. This us user field is joining uploaded files by user via a join.
Code:

$main_table = 'users'; // alias of the main table

$join_table = 'upload'; // alias of the values table

$join_column = 'submitter'; // join column in the values table

$join_description = 'file'; // description column in the values table

$main_column = 'users'; // join column in the main table
$opts['fdd']['users'] = array(
  'default'    => '',
  'input'      => '',
  'maxlen'     => 30,
  'name'       => 'Uploaded Files',
  'options'    => 'ACPVDFL',
  'required'   => false,
  'select'     => '',
  'size|ACP'   => 30,
  'URL'      => 'http://localhost/site.../$link',
  //'URLtarget' = '_blank',
  //'URLdisplay' = '$value',
  'sql|w'       => 'TRIM("$val_as")',
  'sort'       => true,
  'values'     => array(
    'join'     => '$main_table.$main_column = $join_table.$join_column',
    'table'       => 'upload',
    'column'      => 'submitter',
    'description' => array(
      'columns'    => array($join_description)
    )
   
  )
);


 
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