/*
SQLyog Ultimate v11.2 (64 bit)
MySQL - 5.5.49-0+deb7u1-log : Database - akademika_gtportal
*********************************************************************
*/




/* Trigger structure for table `t_user` */

DELIMITER $$

/*!50003 DROP TRIGGER*//*!50032 IF EXISTS */ /*!50003 `insert_data_user` */$$

/*!50003 CREATE */ /*!50017 DEFINER = 'root'@'localhost' */ /*!50003 TRIGGER `insert_data_user` AFTER INSERT ON `t_user` FOR EACH ROW BEGIN
	insert into `users` 
	SET 	`username` = NEW.`tusrNama`,
		`password` = NEW.`tusrPassword`
	ON DUPLICATE KEY UPDATE
		`password` = NEW.`tusrPassword`;	
    END */$$


DELIMITER ;

/* Trigger structure for table `t_user` */

DELIMITER $$

/*!50003 DROP TRIGGER*//*!50032 IF EXISTS */ /*!50003 `update_data_user` */$$

/*!50003 CREATE */ /*!50017 DEFINER = 'root'@'localhost' */ /*!50003 TRIGGER `update_data_user` AFTER UPDATE ON `t_user` FOR EACH ROW BEGIN
	UPDATE `users`
	set `password` = NEW.`tusrPassword`
	where `username` = NEW.`tusrNama`;
    END */$$


DELIMITER ;

