A
A
abuki2020-02-25 18:39:50
MySQL
abuki, 2020-02-25 18:39:50

How to execute sql query correctly?

Good day.
I wrote the following query:

UPDATE wp_posts SET post_content = REPLACE (post_content, '<div class="Reclammaad">
<div class="aligncenter">', '<div class="Recla1">
<div class="alignc1">');

It is necessary to replace the selected two lines:
5e553aab4f20f124800833.png
When I try to replace two lines at the same time using the query that I wrote above,
for some reason the request does not pass
. ?
When replacing one line, for example, the <div class="Reclammaad">request works!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-02-25
@zkelo

If you are using MySQL, then the best option is to use the UpdateXML() function

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question