salix/db/routines/vn/triggers/ticketService_au.sql

14 lines
375 B
MySQL
Raw Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketService_au`
AFTER UPDATE ON `ticketService`
FOR EACH ROW
BEGIN
IF !(NEW.price <=> OLD.price)
OR !(NEW.ticketFk <=> OLD.ticketFk)
OR !(NEW.quantity <=> OLD.quantity) THEN
CALL ticket_requestRecalc(NEW.ticketFk);
CALL ticket_requestRecalc(OLD.ticketFk);
END IF;
END$$
DELIMITER ;