I have been inserting some data in MYSQL with escaped quotes like this \' or \" the issue here is that mysql inserts the full sequence \' inestead of '
I cant find the solution online
thanks in advance
I have been inserting some data in MYSQL with escaped quotes like this \' or \" the issue here is that mysql inserts the full sequence \' inestead of '
I cant find the solution online
thanks in advance
Rather than replace individual quotation marks, run the function
$cleanString = mysql_real_escape_string($incomingText);
(note, this method has been deprecated in place of the following method) or
$cleanString = mysqli_real_escape_string($incomingText);
This will also protect you against SQL injections. After the methods been run, insert text $cleanString
instead of $incomingText
.
Hope this helps.