I am having some problems with mysql 5. I am trying to update a row, but it seems I get that
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 'm A Message' at line 1
It seems to do with the description variable's value. Since it has the " ' " in the text, but I thought mysql_esacpe_string would fix this problem. So what do I have to do?
Here is my code:
[PHP]$description2 = htmlentities(stripslashes(mysql_escape_string($_PO ST['description'])));
mysql_query("UPDATE sites SET url='$url2', title='$title2', description='$description2', ad='$ad1', avatar='$avatar' WHERE id = '$site'") or die('<br>'. mysql_error());
[/PHP]
Is this something with my hosting company or did they change some stuff with php5 with mysql_escape_string?