Quiero reemplazar en toda la tabla un conjunto de líneas con otro conjunto de líneas en la tabla wordpress mysql.
en la tabla wp_posts.
La siguiente consulta no funciona
UPDATE wp_posts
SET
field_name = REPLACE(post_content,
'<ul class="portfolio-list sort-destination" data-sort-id="portfolio">
<li class="col-md-4 isotope-item websites">
<div class="portfolio-item"><span class="thumb-info">
<span class="thumb-info-wrapper">
<img class="img-responsive" src="https://theinternationalrealtors.com/wp-content/uploads/2020/03/feature-your-property.jpg" alt="" /></span></span></div></li>
</ul>',
'<div class="col-md-12">
<div class="table-responsive table-responsive-sm">
<table class="table-bordered table-hover table-striped">
<thead>
<tr>
<th>Company</th>
<th>Name</th>
<th>Phone</th>
<th>Website</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>');
¿Hay alguna otra declaración? ¿Alguna ayuda? Para hacerse con phpMyAdmin. ¿O hay algún complemento de wordpress adecuado disponible?
Lo hice con caracteres de escape pero todavía error.
UPDATE wp_posts
SET
post_content = REPLACE(post_content,
'<ul class=""portfolio-list sort-destination"" data-sort-id=""portfolio"">n
<li class=""col-md-4 isotope-item websites"">n
<div class=""portfolio-item"">n
<span class=""thumb-info"">n
<span class=""thumb-info-wrapper"">n
<img src=""https://theinternationalrealtors.com/wp-content/uploads/2020/03/feature-your-property.jpg"" class=""img-responsive"" alt=""""></span></span>n
n
</div></li>n
</ul>',
'<div class=""col-md-12"">n
<div class=""table-responsive table-responsive-sm"">n
<table class=""table-bordered table-hover table-striped"">n
<thead>n
<tr>n
<th>Company</th>n
<th>Name</th>n
<th>Phone</th>n
<th>Website</th>n
</tr>n
</thead>n
<tbody>n
<tr>n
<td></td>n
<td></td>n
<td></td>n
<td></td>n
</tr>n
<tr>n
<td></td>n
<td></td>n
<td></td>n
<td></td>n
</tr>n
<tr>n
<td></td>n
<td></td>n
<td></td>n
<td></td>n
</tr>n
</tbody>n
</table>n
</div>n
</div>');
.