UPDATE sometable SET somefield=REPLACE(somefield,'/wordpress//','/wordpress/');
Edit
@ Kevin asked me to explain this question, so we go:
- I assume the basic UPDATE is clear: on all
sometable lines sometable assign a new value to somefield - The
REPLACE() function does exactly what it says: it replaces the text. In our case, we ant will take the old value of somefield , then replace all the values โโ"/ wordpress //" with "/ wordpress /" - these two parts, taken together, mean that in all
sometable lines sometable set somefield value you get if you replace all the values โโof "/ wordpress //" with "/ wordpress /" in the old value.
source share