1. What is the SQL Command to find multiple words in the description and replace them with another word?
2. What is the SQL command to find multiple words in the description and delete them?
3. What is the SQL Command to find multiple words in the title and replace them with another word?
4. What is the SQL command to find multiple words in the title and delete them?
2. What is the SQL command to find multiple words in the description and delete them?
3. What is the SQL Command to find multiple words in the title and replace them with another word?
4. What is the SQL command to find multiple words in the title and delete them?
you have to create a procedure for each work
other (sloppy) way is to export sql data, find/replace to a notepad++ and import them again
other (sloppy) way is to export sql data, find/replace to a notepad++ and import them again
take a visit to My Modules !
Yeah I did it before the first way, by executing an SQL command... however I dont remember the commands so I need help with someone writing me the template for the command
To update a description you could use the following SQL command from the command line:
To remove "unwanted" from a product_description:
To replace "unwanted" from a product's title:
To remove "unwanted" from a product's title::
Backups can save you from a mistake
Immediately before you start using SQL (if you are not sure about it) you should backup your entire database. You can do it from the command line (in Linux) using
You can restore from this backup using the same command you use to execute mysql commands reading from your database backup:
Code: Select all
update oc_product_description set description = replace(description, "phrase you don't want", "phrase you want");
Code: Select all
update oc_product_description set description = replace(description, "unwanted", "");
Code: Select all
update oc_product_description set name = replace(description, "unwanted", "wanted");
Code: Select all
update oc_product_description set name = replace(description, "unwanted", "");
Immediately before you start using SQL (if you are not sure about it) you should backup your entire database. You can do it from the command line (in Linux) using
Code: Select all
mysqldump --host=<sql host address> --user=DatabaseUsername --password opencart_databasename > DatabaseBackup.sql
Code: Select all
sql --host=<sql host address> --user=DatabaseUsername --password opencart_databasename < DatabaseBackup.sql
Last edited by straightlight on Sun Apr 26, 2020 1:15 am, edited 1 time in total.
Reason: Please add the code tags!
Reason: Please add the code tags!
wow, thank U - wonder why noone has replied
--- please reply only with verified data, that is: no 'I think', 'maybe' etc. ---
Who is online
Users browsing this forum: Semrush [Bot] and 31 guests