Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql 分析错误:语法错误,意外'$sql';(T_变量)在15中_Mysql_Sql_Environment Variables - Fatal编程技术网

Mysql 分析错误:语法错误,意外'$sql';(T_变量)在15中

Mysql 分析错误:语法错误,意外'$sql';(T_变量)在15中,mysql,sql,environment-variables,Mysql,Sql,Environment Variables,我有以下疑问 $sql=" UPDATE reg_voters_t SET county='$county', constituency='$constituency', regcenter='$regcenter' WHERE IDNo='$IDNo'"; 当我运行上面的查询时,我得到了这个错误- 分析错误:语法错误,15中出现意外的“$sql”(T_变量) 问题可能是SQL查询前面的行缺少分号(;)。错误以$sql开头,因此它必须是之前的内容 $a = 10 $sql = "UP

我有以下疑问

$sql=" UPDATE reg_voters_t SET county='$county', constituency='$constituency', regcenter='$regcenter' WHERE IDNo='$IDNo'";
当我运行上面的查询时,我得到了这个错误-

分析错误:语法错误,15中出现意外的“$sql”(T_变量)


问题可能是SQL查询前面的行缺少分号(;)。错误以$sql开头,因此它必须是之前的内容

$a = 10
$sql = "UPDATE reg_voters_t SET county='$county', constituency='$constituency', regcenter='$regcenter' WHERE IDNo='$IDNo'";
包含“$sql”声明的代码前的行缺少分号


问题可能是SQL查询前面的行缺少分号(;)。错误以$sql开头,因此它必须是之前的内容

$a = 10
$sql = "UPDATE reg_voters_t SET county='$county', constituency='$constituency', regcenter='$regcenter' WHERE IDNo='$IDNo'";
包含“$sql”声明的代码前的行缺少分号