| Index
» Projects
» phpMyEdit
» Forum
» HELP PLEASE! HOW TO STORE A VIRTUAL VALUE |
 |
pj
Joined: 02 Jul 2014
Posts: 2
Posted: 2015-07-22 14:20
Back to top
Reply with quote
|
Hi there!
Since last days Im stuck on this problem.
I'm virtually generating a value. I can see it on the table, but I need to store it on the database. I have tried lots of possibilities and nothing helps me.
Any suggestion will be highly appreciated
The code:
$main_table2 = 'p_management_project_members';
$join_table2 = '(SELECT project_manager, SUM(bonus_percentage) as total2 FROM p_management_bonuses GROUP BY project_manager)';
$opts['fdd']['bonus_percentage'] = array(
'name' => 'Bonus (%)',
'select' => 'T',
'values' => array( // API for currently making a join in PME.
'table' => $join_table2, // the table to which we're joining
'column' => 'project_manager', // the key field in the joined table
'join' => '$main_table.member = $join_table.project_manager',
'description' => 'total2'
// the desired column in the joined table
),
'options' => 'RLF',
'maxlen' => 65535,
'textarea' => array(
'rows' => 1,
'cols' => 5),
'sort' => true
);
|
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2015-07-23 15:50
Back to top
Reply with quote
|
http://opensource.platon.org/projects/doc.php/phpMyEdit/html/configuration.triggers.html
Three triggers might be the answer, insert, update, delete. Use the forum Search features to locate trigger examples.
|
|
Post new topic
Reply to topic
|
|
|
|