I currently have a disparador
that updates when I delete a data from the table pago_detalles
update pagos a
join pago_detalles di
on di.idpago = a.id
set a.pagado = a.pagado - di.monto
but do not let me create another trigger delete
then I must put it there but I do not know how I could do it.
the other trigger is the same in delete but it is:
update pagos a
join pago_detalles di
on di.idpago = a.id
set a.status = 1
How can I join them so that it is in a single trigger
DELETE
?