Created
May 10, 2017 06:04
-
-
Save n8finch/61d35c6c48cd1562c99834a2bd396f48 to your computer and use it in GitHub Desktop.
some incomplete SQL scripts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
wp_redirection_items.*, | |
wp_redirection_groups.position AS group_pos | |
FROM wp_redirection_items | |
INNER JOIN wp_redirection_groups ON | |
wp_redirection_groups.id=wp_redirection_items.group_id | |
AND wp_redirection_groups.status='enabled' | |
AND wp_redirection_groups.module_id RLIKE 'd' | |
WHERE (wp_redirection_items.regex=1 OR wp_redirection_items.url RLIKE '\/$') | |
17154 | |
105 | |
17259 | |
/* SELECT | |
wp_redirection_items.* | |
FROM wp_redirection_items */ | |
UPDATE wp_redirection_items | |
SET url = REPLACE( url, '/nate', '') | |
regex = 1 | |
WHERE url NOT REGEXP '/$' | |
/* UPDATE wp_redirection_items | |
SET url = CONCAT( url, '[/]?') */ | |
WHERE url NOT REGEXP '/$' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment