Hi,
how do I add (using SQL) string that has the char '
?
I have many words that look like this- dsf'dfdf or dfsdf'
but when I'm trying to add them the query command thinks that the ' is the end of the string and then messes up everything after that.
for example-
$query = "INSERT INTO tbl (Id, courseName) ".
"VALUES('$Id','$Name');";
so if the $Name is "abc'def" the query thinks that the "def" part is SQL syntex and gives me errorssssssssss
I should also add that there's no way to change the string that needs to be inserted. there are thousands of records