I want to search through some text and find where width is bigger than 200 and replace it with 300. I'm using MySQL 4.1.11.
This is what i got so far.
update `Artikkel`
set `Hoved` = replace(`Hoved`, regexp 'width="(.*)"', 'width="300"')
where convert(int, substring(`Hoved`, instr(`Hoved`, 'width') + 7, 3)) > 200;
But i get this error:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'regexp 'width="(.*)"', 'width="300"')
where convert(int, substring(`Hoved`, i' at line 2
Any ideas?
This is what i got so far.
update `Artikkel`
set `Hoved` = replace(`Hoved`, regexp 'width="(.*)"', 'width="300"')
where convert(int, substring(`Hoved`, instr(`Hoved`, 'width') + 7, 3)) > 200;
But i get this error:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'regexp 'width="(.*)"', 'width="300"')
where convert(int, substring(`Hoved`, i' at line 2
Any ideas?