I have a database with products and each product also contain a field with its description. Problem is, the old site used a ‘funny old SEO technique’ in wich manages added a phrase after each product description, take a look below. I’m trying to find the best way to programatically delete this phrase from product’s description field using either regex in mysql queries or php.
The text in the field (varchar) is something like this:
Powder for mixing with water-based paint. 1KG recipients.
All our products have been tested and certified. Buy now from now and
we will offer you free shipping for orders above 100 Euros
I need to remove the phrase starting with
All our products…….
Can I do this directly in mysql or do I need to make a PHP script?
Thanks
2
Answers
I used this code
Here is a pretty simple way: