| Index
» Projekty
» phpMyEdit
» Fórum
» Re: Virtual Fields |
 |
Zack
Založený: 23.07.2004
Príspevky: 5
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
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
|
|
|
|