Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Making an upload URL link

phpMyEdit General     Making an upload URL link
Odoslať novú tému   Odpovedať na tému    
 
texasnerd     Založený: 09.06.2009   Príspevky: 2  
Príspevok Zaslal: 2009-06-12 19:35
Návrat hore  Odpovedať s citátom     

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.
Kód:

$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)
    )
   
  )
);


 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov