MySQL Forums
Forum List  »  General

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

OK. Got there. Thanks for the pointers.

UPDATE `jml_content` SET `attribs`= REPLACE(`attribs`,'show_tags":""','show_tags":"1"')
WHERE INSTR(`attribs`,'show_tags":""') AND `catid`=24

REPLACE changed the text I wanted changing
INSTR restricted the records to thosae that had the text needed changing
AND `catid' restricted updates to just the records in the category I wanted to change.

Options: ReplyQuote


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


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.