This topic is locked

How to calculate Sum,Div,Avg ,,,

10/7/2009 7:01:51 AM
PHPRunner General questions
F
fatahalrhman author

Dear all,
Greetings,
I'm a new user for PHPRunner 4.2, So how can I calculate sum,div,avg for the fields.
Regards.

J
Jane 10/7/2009

Hi,
you can calculate these values in the SQL query on the Edit SQL query tab:

select

field1,

field2,

field1-field2 as custom_div

from TableName



or on the add/edit pages with Before record added/Before record updated events on the Events tab:

$values["field1"] = $values["field2"]-$values["field3"];