How do I get my PHP update function to work?

Von269

New Member
See something wrong in my code? I can't get the update function to work.. weird thing is the rest works correctly, and the same code works 100% on another page.\[code\]<?phpinclude("config.php");$id = $_GET['id'];$number = $_GET['no'];$result = mysql_query("SELECT * FROM comments WHERE commentid = '$id'")or die(mysql_error()); $row = mysql_fetch_array( $result );mysql_query("update `comments` set like = like +1 where commentid = '$id'"); <--- only this here doesnt work?>\[/code\]And there is 1 line of html after that, a span tag getting some information out of the comments table.My 'like' column is set to int(11), so I don't see that being the problem.Hope this isnt another innatention mistake :/Thanks alot to anyone who can help me out!This is the error\[quote\] 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 = like +1 where commentid = '61'' at line 1\[/quote\]
 
Back
Top