MySQL Hint: REPLACE / UPDATE
Replace strings with SQL in a field for all rows …
UPDATE `table` SET `field` = REPLACE(`field`, 'search string', 'replace with this') WHERE 1=1;
via @vogrim
Replace strings with SQL in a field for all rows …
UPDATE `table` SET `field` = REPLACE(`field`, 'search string', 'replace with this') WHERE 1=1;
via @vogrim
SELECT CHAR_LENGTH(field)-CHAR_LENGTH(REPLACE(field,’-',”)) AS count FROM table