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  »  Re: Virtual Fields

phpMyEdit General     Re: Virtual Fields
Odoslať novú tému   Odpovedať na tému    
 
Zack     Založený: 23.07.2004   Príspevky: 5  
Príspevok Zaslal: 2004-08-25 02:17
Návrat hore  Odpovedať s citátom     

This is a "Virtual Field" that I need some help on. The field is getting its value from the records cid column ('sql' => 'PMEjoin1.cid',). How do I take the value and use it to get the value of a field in another table ? I was thinking as shown below. but I got something wrong.

Kód:
$opts['fdd']['licensed_status'] = array(
  'name'     => 'Licensed status',
  'select'   => 'T',
  'sql'      => 'PMEjoin1.cid',
  'colattrs' => 'align="center" ',
  'options'  => 'V',
  'maxlen'   => 65535,
  'values'   => array( 'table' => 'categories', 'column' => 'cid', 'description' => 'ak' ),
  'URL'      => '$value',
  'URLdisp'  => 'Status Page',
  'URLtarget' => '_blank'
);


The value I get from PMEjoin1.cid I want to use in the 'values' array. The current output now is PMEjoin1.cid not the value I want from the array.

$value = SELECT ak FROM categories WHERE cid = 'PMEjoin1.cid'

What did I miss? ?:-|

 
michal     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2004-08-25 10:51
Návrat hore  Odpovedať s citátom     

afaik, if 'sql' is set, 'values' is ignored. you need to use new 'join' option instead of 'sql'. see cvs documentation with an example which should help a lot.

 
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