I have the following code
$id_post = mysql_real_escape_string($_POST['id']);
$forumid = (int)mysql_real_escape_string($_POST['forumid']);
$message = mysql_real_escape_string($_POST['message']);
mysql_query("UPDATE forum_reactions SET message = ".$message." WHERE id = ".$id_post." ");
message is the TEXT column
It gives this error
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'staat niet in het woordfilter lol WHERE id = 39' at line 1
mysql_**
functions! You'd better usePDO
. – mpyw Sep 12 '13 at 21:17mysql_real_escape_string
, and would be stored as that string literal. – halfer Sep 12 '13 at 21:23$forumid
. – Andy Lester Sep 12 '13 at 21:24