Greetings friend I created a Trigger but it does not update me, what I would like to achieve is the following when you make an insertion in the advance table I update the amount that is in the table transvalue example if in amount_trans_values_current I have 20 and I make an insersion in the table in advance of 7 in the table transvalues I should stay 13
Advances table (ticket_code, amount, percentage, profit, total, id_points, date, time, user_id)
Transvalues table (amount_of_aperture_values, amount_of_current_values, date, names and surname
CREATE
TRIGGER nuevotrasvalor AFTER INSERT
ON adelantos
FOR EACH ROW
UPDATE trasvalores SET monto_trasvalores_actual = (monto_trasvalores_actual-
NEW.monto)
WHERE monto_trasvalores_actual = NEW.monto_trasvalores_actual