UPDATE `comp_acc_det` SET `amountdr` = amountdr +39996, `amountcr` = amountcr +0, `total` = amountdr - amountcr, `updatedBy` = '16' WHERE `companyID` =  '15' AND `acctID` =  '79' AND `year` =  '2014' AND `period` =  '2'