Hi all, I'm using ZC 139h and need help with a sql script for updating several product titles and descriptions on mass.
I sell pin badges, but am now able to make magnets too so need to update all my product titles to include the word "magnet". I have hundreds of products so cannot do this by hand.
Example of current title "Retro Toy Badge - Care Bears" needs updating to "Retro Toy Badge/Magnet - Care Bears"
I also need to bulk update all the descriptions, which are basically the same thing but with the title included in it.
Example of current description "1980's Care Bear Cousins badge. Measures 45mm." needs updating to "1980's Care Bear Cousins badge or magnet. Measures 45mm."
I've amended a sql script I found on this forum here http://www.zen-cart.com/showthread.p...g-an-SQL-Query, but it failed to work (simple stated "failed").
I changed this (where the forum member wanted "Chord" replaced with "Cord":
Code:
UPDATE products_description
SET products_name = REPLACE(products_name,'Cord','Chord')
WHERE products_name like '%cord%'
to this:
Code:
UPDATE products_description
SET products_name = REPLACE(products_name,'Retro Toy Badge/Magnet -','Retro Toy Badge -')
WHERE products_name like '%retro toy badge -%'
I also exported my sql database and amended that, but it failed to import when using phpmyadmin (#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 ' CREATE TABLE `module_version_tracker` (`ID` int(10) NOT NULL AUTO_INCRE' at line 1 ))
Can anybody help me a sql script for my two updates please? Either for use in Zen Cart or phpmyadmin.
Thanks in advance for any help!
Bookmarks