auto table update in sql hook
Posted: 2017-05-04 14:54
i have two table
1. FUNDED_TRANSACTION when BALANCE update
2. FUNDED_BANK_SUMMARY then this table BALANCE update
function FUNDED_BANK_SUMMARY_before_insert(&$data, $memberInfo, &$args){
$data['AVAILABLE_BALANCE'] = $data['LOAN_LIMIT'] - $data['BALANCE'];
by hook work ok....
but problem is when FUNDED_TRANSACTION BALANCE update then FUNDED_BANK_SUMMARY this table BALANCE not auto update .
how can i do
1. FUNDED_TRANSACTION when BALANCE update
2. FUNDED_BANK_SUMMARY then this table BALANCE update
function FUNDED_BANK_SUMMARY_before_insert(&$data, $memberInfo, &$args){
$data['AVAILABLE_BALANCE'] = $data['LOAN_LIMIT'] - $data['BALANCE'];
by hook work ok....
but problem is when FUNDED_TRANSACTION BALANCE update then FUNDED_BANK_SUMMARY this table BALANCE not auto update .
how can i do