#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 12
delimiter |
CREATE TRIGGER `pointhistorytrigger` AFTER UPDATE ON `points`
FOR EACH ROW BEGIN
IF NEW.is_open='4'
THEN
INSERT into point_history (`idpoints`,`idmembers`,`action_time`,`action_type`)
VALUES (OLD.idpoints,NEW.idmembers,NOW(),'3');
ELSE IF NEW.is_open='3'
THEN
INSERT into point_history (`idpoints`,`idmembers`,`action_time`,`action_type`)
VALUES (OLD.idpoints,NEW.idmembers,NOW(),'2');
END IF;
END;
| delimiter ;