MySQL Forums
Forum List  »  Triggers

Re: Create Trigger causes infinite loop
Posted by: Jac Andrews
Date: March 27, 2012 05:43PM

OK, I do not know whether it was a locking or a version problem. Whatever it was is resolved now.

The following trigger is created in the WordPress db.
However, new user records are not inserted into the remote database (bs) when a new user is inserted into the WP database.

Thanks for advising any errors you notice:

-----------------------------

DROP TRIGGER IF EXISTS before_insert_wpuser;
delimiter |
CREATE TRIGGER before_insert_wpuser BEFORE INSERT ON `wp_users` FOR EACH ROW BEGIN
INSERT INTO `bs`.`user_info` (`id`,`ui_email`,`ui_nickname`,`ui_password`)
VALUES (new.`id`,new.`user_email`,new.`user_login`,new.`user_pass`);
END;
|
delimiter ;

-----------------------------
Note: the values list is reduced to ease review. The entire Insert query is tested and is syntactically correct.

Options: ReplyQuote


Subject
Views
Written By
Posted
3060
March 27, 2012 07:56AM
Re: Create Trigger causes infinite loop
2523
March 27, 2012 05:43PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.