0

I have a table called products which has a field called products_description, how can I remove certain text from the fields for example if the text abc exists then remove it from all products?

thanks

John
  • 136
  • 1
  • 12

1 Answers1

1

run a query

select * from products where products_description like '%abc%'

and for each result do

new_description = str_replace('abc','',old_description);

and run an update query with the new description.

Dotan
  • 6,602
  • 10
  • 34
  • 47