I have some hardcoded information in my database fields. I want to replace them with empty strings. What is the best way to replace those fields?
You can use Mysql replace as follows:
UPDATE table SET field = REPLACE(field, 'string-to-be-replaced', 'string-replaced')
Like in Drupal, if I have to replace a string (say, alpha2) in body of the content. I would replace body field in node_revisions table as follows:
UPDATE node_revisions SET body = REPLACE(body, 'alpha2', '')
You can find more detail here: Mysql String replace.
You can use Mysql replace as follows:
Like in Drupal, if I have to replace a string (say, alpha2) in body of the content. I would replace body field in node_revisions table as follows:
You can find more detail here: Mysql String replace.