https://www.sitepoint.com/how-to-create-mysql-triggers/ I created two tables: CREATE TABLE `sw_user` ( `id` ) unsigned NOT NULL AUTO_INCREMENT, `name` ) DEFAULT '', `mobile` ) DEFAULT '', `sex` ) , `address` ) DEFAULT '', `status` ) unsigned , PRIMAR…