Redirect - Unknown Error - SQL Table Issue? | Peter's Login Redirect | Forum
Back to the login redirect plugin page
Topic RSS
Redirect - Unknown Error - SQL Table Issue?
December 2, 2013
11:54 am
11:54 am
primasilva
New Member
Forum Posts: 1
Offline
I just installed your plugin and when I went to test it out by creating a role-based redirect, I got the following error:
****ERROR: Unknown error updating role-specific URL for role administrator****
I went into my database and saw that the table wasn't created. Is your code optimized for MS SQL or just MySQL/Oracle? If not, can you please give me the CREATE TABLE query that I'll need to get this working?
Hi,
I've only tested it on MySQL, unfortunately. However, here is the CREATE TABLE statement:
CREATE TABLE wp_login_redirects (
`rul_type` enum('user','role','level','all','register') NOT NULL,
`rul_value` varchar(255) NULL default NULL,
`rul_url` LONGTEXT NULL default NULL,
`rul_url_logout` LONGTEXT NULL default NULL,
`rul_order` int(2) NOT NULL default '0',
UNIQUE KEY `rul_type` (`rul_type`,`rul_value`)
);
`rul_type` enum('user','role','level','all','register') NOT NULL,
`rul_value` varchar(255) NULL default NULL,
`rul_url` LONGTEXT NULL default NULL,
`rul_url_logout` LONGTEXT NULL default NULL,
`rul_order` int(2) NOT NULL default '0',
UNIQUE KEY `rul_type` (`rul_type`,`rul_value`)
);