Skip navigation links

MySQL Forums :: Triggers :: Create Trigger causes infinite loop


Advanced Search

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
Create Trigger causes infinite loop 1344 Jac Andrews 03/27/2012 07:56AM
Re: Create Trigger causes infinite loop 539 Peter Brawley 03/27/2012 09:30AM
Re: Create Trigger causes infinite loop 625 irek kordirko 03/27/2012 12:01PM
Re: Create Trigger causes infinite loop 740 Jac Andrews 03/27/2012 04:20PM
Re: Create Trigger causes infinite loop 836 Jac Andrews 03/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.