Skip to content

Instantly share code, notes, and snippets.

@Haisum92
Last active May 10, 2020 20:55
Show Gist options
  • Save Haisum92/e8962633ab2f34df3cec571917db9bd9 to your computer and use it in GitHub Desktop.
Save Haisum92/e8962633ab2f34df3cec571917db9bd9 to your computer and use it in GitHub Desktop.
Query Helper Querie #SQL
Search and Replace mysql
UPDATE t
set url = REPLACE(url, 'http:', 'https:')
WHERE url LIKE '%http:%';
update wp_postmeta
set meta_value = REPLACE(meta_value, 'https:', 'http:')
WHERE meta_value LIKE '%https:%';
#ONLY_FULL_GROUP_BY Fix
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment