# dbname  : sponsorkliks
# host    : 172.28.0.2

Warning: file_put_contents(/home/obos/docker/sponsorkliks_mysql/transactions/storage/awin/programs.json): Failed to open stream: No such file or directory in /opt/web03/transactions/update_awin.php on line 41

Warning: file_get_contents(/home/obos/docker/sponsorkliks_mysql/transactions/storage/awin/programs.json): Failed to open stream: No such file or directory in /opt/web03/transactions/update_awin.php on line 43

UPDATE sponsorkliks.transactions 
SET commission_gross = FORMAT(SUBSTRING_INDEX(SUBSTRING_INDEX(transaction_json, "commissionAmount\":", -1), ",", 
1)+SUBSTRING_INDEX(SUBSTRING_INDEX(transaction_json, "commissionAmount2\":", -1), ",", 1), 2), commission_net = 
FORMAT(SUBSTRING_INDEX(SUBSTRING_INDEX(transaction_json, "commissionAmount\":", -1), ",", 1)+SUBSTRING_INDEX(SUBSTRING_INDEX(transaction_json, 
"commissionAmount2\":", -1), ",", 1), 2)*.75 
WHERE transaction_date > (NOW() - INTERVAL 90 DAY) AND transaction_source LIKE "%\_awin"
AND transaction_json LIKE "%commissionAmount2%";
