Special character replacement in MySQL

 

There are some words due to collation shows special characters in front end .

========================================================

If   we need to remove from mysql field we can do following

mysql_query(“UPDATE products SET `displayname` = REPLACE(displayname, CHAR(160), ‘ ‘), `name` = REPLACE(name, CHAR(160), ‘ ‘) WHERE product_id=’$product_id’ “);

================================================================

 

We can replace them in MySQL like below:

UPDATE products SET long_desc = REPLACE(long_desc, “’”, “‘”) WHERE product_id = 1256
UPDATE products SET long_desc = REPLACE(long_desc, “®”, “‘”) WHERE product_id = 1544
UPDATE products SET long_desc = REPLACE(long_desc, “�”, ” “) WHERE product_id = 1544