Hi,
I want to insert apostrophe character into a field in dynamic query.
I used the following function:
$str = str_replace("'", "'\'", $str);
Although it inserts the record without error, it returns two apostrophe characters on selecting that field.
Let say, $str = "I can't";
After this function it becomes $str = "I can''t";
Thus does not cause error on insertion but returns "I can''t"
How can I insert the strings with this characters through dynamic queries without changing the word.
Thanks