Hi There, I created the following AFTER UPDATE trigger on the table manage_transaction using IF-THEN condition in order to insert the specific data into the table manage_site_income_details BUT, neither a single row is inserted into manage_site_income_details nor any error encounters. However, I modified my IF-THEN condition many times, but no success. Please help me figure out the issue.
DROP TRIGGER IF EXISTS
`upon_subscription_payment`;
CREATE DEFINER = `test-db-ru-admin`@`%` TRIGGER `upon_subscription_payment`
AFTER UPDATE
ON
`manage_transaction`
FOR EACH ROW
IF
OLD.about LIKE 'SUB' AND NEW.status = 'Completed'
THEN
INSERT INTO
manage_site_income_details
VALUES(
NULL,
OLD.t_id,
OLD.txn_id,
'SUB_Fee',
OLD.fee,
NOW());
END IF
Aucun commentaire:
Enregistrer un commentaire