| Index
» Projects
» phpMyEdit
» Forum
» Re: Virtual Fields |
 |
Zack
Joined: 23 Jul 2004
Posts: 5
Posted: 2004-08-25 02:17
Back to top
Reply with quote
|
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.
| Code: |
$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
Joined: 17 Jun 2003
Posts: 537
Location: Slovakia
Posted: 2004-08-25 10:51
Back to top
Reply with quote
|
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.
|
|
Post new topic
Reply to topic
|
|
|
|