I had an employee typo a word several times into the description field of every category. Is it possible to open the exported mySQL file find the typo change it in a text editor and import it back in? it would save a LOT of time.
I had an employee typo a word several times into the description field of every category. Is it possible to open the exported mySQL file find the typo change it in a text editor and import it back in? it would save a LOT of time.
Yes you can fix a typo with a small bit of SQL code!!
I've run this in phpmyadmin, but I assume it'll work in the Install SQL Patches from admin also.
BACK UP YOUR DATABASE BEFORE RUNNING THIS!
Code:update products_description set products_description = replace(products_description,'[string_to_find]','[string_to_replace]');
Bear in mind that the above relates to a field in the PRODUCTS table.
You are referring to the categories description, so your SQL would need to reference the relevant table and field.
20 years a Zencart User
Thanks for the help! I was thinking along a completely different line. i exported my database from phpmyadmin and unzipped the file , opened it up in a text editor and change it that way but was not sure if I could import the fixed file back into phpmyadmin.
But your saying run a query in phpmyadmin.
Bookmarks