I have this part of code:
$result = mysql_query("SELECT * FROM posts WHERE id = '$id'") or die (mysql_error());
$rec = mysql_fetch_array($result) or die (mysql_error());
$like = $rec['like'];
$like += 1;
mysql_query("UPDATE posts SET like = '$like' WHERE id = '$id'") or die (mysql_error());
and returning this error:
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 'like = '1' WHERE id = '43'' at line 1"