New Zenner
- Join Date:
- Oct 2007
- Location:
- France & Luxembourg
- Posts:
- 37
- Plugin Contributions:
- 0
find/replace (sub)strings in zen's mysql-DB (mysql syntax question)
hello, i have an issue with SQL's syntax. I am moving a DB to another server/version.
this is my SQL-query.
UPDATE
mypa_store.productsSETproducts_model= REPLACE(products_model,'376005','') WHEREproducts_modelLIKE '%376005%';
I want it to "strip" (using REPLACE) '376005' in every product model
where it occurs in strings like '376005xxxxxx' . Unfortunately i cannot
figure out what to do, the query results in a "success" on "0 rows affected".
:oops:
I tried hard but don't understand how the sql-manual wants me to use it.
the best, error free query i made was the one on top. :dontgetit
while this is more a mysql related-question, it thought it might help
some other people who need to batch-rename product models or other
strings in their zencart DB.
Anyway many thanks for the help