I need to replace all double quotes to single quotes using mysql query.
How can I do that. My sql should be in double quotes.
mysql="select replace(text,'\"',''') from mytable"
throwing error. How can I escape that single quotes inside query?
Try this one
$mysql="select replace(text,'\"',\"'\") from mytable";
Then the query will become
select replace(text,'"',"'") from mytable
at the Mysql end.