quelque chose comme
DELIMITER //
CREATE TRIGGER updtrigger BEFORE UPDATE ON mytable
FOR EACH ROW
BEGIN
IF NEW.active <> OLD.active THEN
SET NEW.date = '';
END IF;
END
//
quelque chose comme
DELIMITER //
CREATE TRIGGER updtrigger BEFORE UPDATE ON mytable
FOR EACH ROW
BEGIN
IF NEW.active <> OLD.active THEN
SET NEW.date = '';
END IF;
END
//