我在php中比较新。当我将值插入数据库的“离开”表时,我正面临着这个问题。错误在下面给出。使用get方法将数值插入到数据库中
您的SQL语法错误;检查对应于你的MySQL服务器版本正确的语法附近“其中盖= 4”在行1
,这里是我的代码
<?php
include_once 'config.php';
$accept = "accepted";
mysql_query("insert into `leave` (`action`) values ('$accept') where lid = ".$_GET['id'] , $dbCon) or die(mysql_error());
header('location: admin_leave.php');
?>
其工作.. – Tanvir 2013-04-21 13:32:52