CREATE TRIGGER `results` AFTER INSERT ON `survey` FOR EACH ROW
BEGIN
UPDATE results SET PY5Q1=(SELECT SUM(p1q5)FROM survey) WHERE id=1;
END
CREATE TRIGGER `results` AFTER INSERT ON `survey` FOR EACH ROW
BEGIN
UPDATE results SET PY5Q1=(SELECT SUM(p1q5)FROM survey) WHERE id=1;
END