Re: Create Trigger causes infinite loop
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.
Subject
Views
Written By
Posted
3122
March 27, 2012 07:56AM
1361
March 27, 2012 09:30AM
1497
March 27, 2012 12:01PM
1612
March 27, 2012 04:20PM
Re: Create Trigger causes infinite loop
2620
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.