dan
Joined: 22 Aug 2007
Posts: 2
Posted: 2007-08-22 17:18
Back to top
Reply with quote
|
I am not that good at php and would appreciate any help in here
I have a number of fields and would like to automatically set a field to the sum of 2 other fields (so display but not editable and on save would have the value of the sum of 2 other fields)
Do I need to use triggers?
Here's my simple thinking
Add the following:
calculate the sum
$val (how would I set this to teh sum of 2 fields??)
'sqlw|AC' => $val (is this correct?
then add
$opts['cgi']['overwrite']['Total'] = '$val';
Many thanks for your help
Cheers
Dan
|
michal
Joined: 17 Jun 2003
Posts: 537
Location: Slovakia
Posted: 2007-08-31 15:45
Back to top
Reply with quote
|
so you have column1 and column2 and you wish to have column3 as column1+column2 ?
just 'sql'=>'column1+column2' should work.
|
|
Post new topic
Reply to topic
|
|
|