网页代码错误,求高手指点!
<?phprequire_once('Connections/php.php'); //设置数据库连接
mysql_select_db($database_php, $php); //链接数据库
$id = $_GET['id']; //接收传递的URL参数
$updateCommand="UPDATE news SET hits = hits + 1 where id = $id"; //更新数据的SQL字符串
mysql_query($updateCommand,$php);//执行postmain数据的更新
$updateGoTo = "news.php?id=".$id; //设置更新后前往的页面
header(sprintf("Location: %s", $updateGoTo)); //执行页面的转换
?>
页面预览返回值是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 '' at line 1
请问代码应该怎么改?