PHPMYADMIN syntax
Author
Discussion

paul.deitch

Original Poster:

2,317 posts

288 months

Monday 3rd February 2020
quotequote all
Someone please tell me what's wrong with this please before I kick the dog. I think that I've tried all the possible combinations but of course not... because it's not working. I'm trying to replace external links in the field "introtext" that have been made "safe" to live links in Joomla.

UPDATE `el56k_content2` SET introtext = REPLACE(introtext, '%../www.lvva%', 'http://www.lvva') WHERE `introtext` LIKE '%../www.lvva%'

It's coming up with zero rows even though there are thousands of ../www/lvva-s

Edited by paul.deitch on Monday 3rd February 20:03

droopsnoot

14,744 posts

273 months

Tuesday 4th February 2020
quotequote all
I don't think you need the % signs either end of the first REPLACE parameter, because they're not in the text you're replacing. I think it should be

UPDATE `el56k_content2` SET introtext = REPLACE(introtext, '../www.lvva', 'http://www.lvva') WHERE `introtext` LIKE '%../www.lvva%'