UPDATE data SET data1 = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(data1, '.', ''), '+', ''), ' ', ''), ')', ''), '-', ''), '(', '') WHERE mimetype_id IN ( SELECT _id FROM mimetypes WHERE mimetype LIKE "%phone%" ) AND ( data1 LIKE '%+%' OR data1 LIKE '%.%' OR data1 LIKE '%-%' OR data1 LIKE '% %' OR data1 LIKE '%(%' OR data1 LIKE '%)%' );
Last Updated on October 26, 2015