Solved

wordpress - sql query - comments table - replace mutiple words

Posted on 2014-01-29
1
123 Views
Last Modified: 2014-09-19
On wordpress 3.8

on comments table

What sql query will replace
word1 with word2  
word3 with word4
.
.
word99 with word100



P.S.

I have 10 questions, highest point level - open about sql queries

Soo, Lots of points for an sql guy
0
Comment
Question by:Matt_Walker01
1 Comment
 
LVL 26

Accepted Solution

by:
Zberteoc earned 500 total points
ID: 39820894
You can use nested REPLACE functions:
UPDATE your_table SET 
	your_field = REPLACE(...REPLACE(your_field, 'word1', 'word2'), 'word3', 'word4'),...'word99','word100')
WHERE <condition_here>

Open in new window

0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Creating and Managing Databases with phpMyAdmin in cPanel.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question