MySQL Forums
Forum List  »  General

SELECT/LIKE works but UPDATE/REPLACE doesn't
Posted by: Michael Barraclough
Date: October 24, 2016 06:36PM

I am trying to use phpMyAdmin to change a setting directly in a Joomla database. I have determined that the setting is part of the `attribs` field of the `jml_content` table:

If I don't want to show tags in an article then `attribs` has a value of
...show_tags":""...

whereas if I do want to show tags then `attribs` has a value of
...show_tags":"1"...


Using SELECT and LIKE on '%show_tags":""%' correctly identifies the records that need changing, however, when I use

UPDATE `jml_content` SET `attribs` = REPLACE(`attribs`, '%show_tags":""%', '%show_tags":"1"%')
it does not work!

I would very much appreciate if someone could explain why it doesn't work and what I should change to make it work.

Options: ReplyQuote


Subject
Written By
Posted
SELECT/LIKE works but UPDATE/REPLACE doesn't
October 24, 2016 06:36PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.