Jump to content

How to change content value ?


Germaris

Recommended Posts

Hi there !

I'm quite desperate as I can't find a quick method to partially change the content of a field.

I explain:
In a field named 'notes', PART of the content is:
[code]<a href='mailto:"abc@domain.com"'>abc@domain.com</a>[/code]
This content is wrong.

It must be:
[code]<a href="mailto:abc@domain.com">abc@domain.com</a>[/code]

How can I make the change with a SQL Query instead of manually make the change row by row (approximately 1500 rows contain the error!!!) considering the fact that abc@domain.com is different in each of the rows?

Many thanks in advance for any help!

Best regards,

Gerard
Link to comment
Share on other sites

Not easily, really... REGEXP is useful for matching these rows, but you can't use Perl-style regexs to replace, AFAIK.  However, you can use a combination of LOCATE() and REPLACE(), since you can probably make some simplifying assumption about the location of these extra quotes.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.