Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » How do I…?
  3. » SQL query

#1 2020-04-04 21:03:41

gilibaus
Member
From: Italy
Registered: 2013-08-14
Posts: 91
Website

SQL query

I have to replace the whole <a> tag with an empty string, whatever the download URL is. Is this query correct? Thanks.

UPDATE textpattern SET Body_html = REPLACE(Body_html, '<a href="%">Download</a>', '')

Note: in case % wildcard cannot do the job, please consider that all URLs are of the same length.

Last edited by gilibaus (2020-04-05 11:01:42)

Offline

  1. Index
  2. » How do I…?
  3. » SQL query

Board footer

Powered by FluxBB