TYPE=TRIGGERS
triggers='CREATE DEFINER=`root`@`localhost` TRIGGER `AddTrJualM` AFTER INSERT ON `tr_jualr_m` FOR EACH ROW BEGIN\n  IF (new.KodeCustR IS NOT NULL) AND (new.KodeCustR <> \'\') THEN\n  UPDATE tm_member SET Point =  ifnull(Point,0) + (new.point), PointNon= IFNULL(PointNon,0) + (new.PointNon) WHERE KodeMember=new.KodeCustR; \n  END IF;\nEND' 'CREATE DEFINER=`root`@`localhost` TRIGGER `EditTrJualM` AFTER UPDATE ON `tr_jualr_m` FOR EACH ROW BEGIN\nIF (old.KodeCustR IS NOT NULL) AND (old.KodeCustR <> \'\') THEN\n  UPDATE tm_member SET Point =  ifnull(Point,0) - (old.point), PointNon= IFNULL(PointNon,0) + (old.PointNon) WHERE KodeMember=old.KodeCustR; \n  END IF;\nIF (new.KodeCustR IS NOT NULL) AND (new.KodeCustR <> \'\') THEN\n  UPDATE tm_member SET Point =  ifnull(Point,0) + (new.point), PointNon= IFNULL(PointNon,0) + (new.PointNon) WHERE KodeMember=new.KodeCustR; \n  END IF;\nEND' 'CREATE DEFINER=`root`@`localhost` TRIGGER `DeleteTrJualM` AFTER DELETE ON `tr_jualr_m` FOR EACH ROW BEGIN\nIF (old.KodeCustR IS NOT NULL) AND (old.KodeCustR <> \'\') THEN\n  UPDATE tm_member SET Point =  ifnull(Point,0) - (old.point), PointNon= IFNULL(PointNon,0) + (old.PointNon) WHERE KodeMember=old.KodeCustR; \n  END IF;\nEND'
sql_modes=524288 524288 524288
definers='root@localhost' 'root@localhost' 'root@localhost'
