Hi i've got this bit of code that looks for the ' and adds \ infront of it where needs be when inserting into the database. I've used this bit of code loads in the past, however on this server i'm hosting this site with i get this error
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 's do' WHERE id = '1'' at line 1
here is the code that i'm using
$description2 = str_replace("/", "'", $row_array[3]);
What i don't get is this has worked really well in the past, it's short and sweet, but why not now?
If anyone could help it would be much appreciated
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 's do' WHERE id = '1'' at line 1
here is the code that i'm using
$description2 = str_replace("/", "'", $row_array[3]);
What i don't get is this has worked really well in the past, it's short and sweet, but why not now?
If anyone could help it would be much appreciated