
Originally Posted by
tryphon
update `products_description` set `products_name` = 'Cord' where `products_name` = 'Chord'
This will only change products which are named 'Cord' EXACTLY. It won't change products like 'Cord A', 'Nice Cord' etc. It might not also change products like 'cord' if Your collation in database is set to case sensitive.
I think this is what You want (but backup Your database before executing those statements!):
Code:
UPDATE products_description
SET products_name = REPLACE(products_name,'Cord','Chord')
WHERE products_name like '%cord%'
but REPLACE is case sensitive, so You might want to execute also
Code:
UPDATE products_description
SET products_name = REPLACE(products_name,'cord','chord')
WHERE products_name like '%cord%'