first commit
This commit is contained in:
15
Trigger.sql
Normal file
15
Trigger.sql
Normal file
@ -0,0 +1,15 @@
|
||||
ALTER TABLE `update_log` ADD `user` VARCHAR( 200 ) NOT NULL
|
||||
|
||||
DROP TRIGGER IF EXISTS `update_durchfaller`;
|
||||
|
||||
delimiter |
|
||||
|
||||
|
||||
CREATE TRIGGER update_durchfaller
|
||||
AFTER UPDATE ON stud
|
||||
FOR EACH ROW BEGIN
|
||||
INSERT INTO update_log (uid, old, new, date, user) VALUES (NEW.uid, OLD.durchgefallen, NEW.durchgefallen,now(), user());
|
||||
DELETE FROM update_log WHERE new=old;
|
||||
END;
|
||||
|
|
||||
delimiter ;
|
Reference in New Issue
Block a user