Solved

wordpress - sql query - comments table - replace mutiple words

Posted on 2014-01-29
1
125 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 27

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Part One of the two-part Q&A series with MalwareTech.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

624 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