linkinx
Member
So yes, the triggers keep getting deleted, not sure why.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Run it as a query, I had to remove the delimeter part, also you might want to change dayz'@'% to be dayz'@'localhost if the account only has localhost access.
CREATE TRIGGER `proc_insertHistory` AFTER INSERT ON `character_data` FOR EACH ROW insert into character_history
values(NEW.PlayerUID, NEW.CharacterID, NEW.Inventory, NEW.Backpack, NEW.currentState, NEW.Medical, NEW.Worldspace, NEW.Alive, 'insert', now());
CREATE TRIGGER `proc_updateHistory` AFTER UPDATE ON `character_data` FOR EACH ROW begin
insert into character_history
values(NEW.PlayerUID, NEW.CharacterID, NEW.Inventory, NEW.Backpack, NEW.currentState, NEW.Medical, NEW.Worldspace, NEW.Alive, 'update', now()); --
end;
CREATE TRIGGER `proc_deleteHistory` AFTER DELETE ON `character_data` FOR EACH ROW insert into character_history
values(OLD.PlayerUID, OLD.CharacterID, OLD.Inventory, OLD.Backpack, OLD.currentState, OLD.Medical, OLD.Worldspace, OLD.Alive, 'delete', now());