MySQL Update: Unexpected input field parameter in database query

非 Y 不嫁゛ 提交于 2019-12-12 04:25:35

问题


Whats wrong with this piece of code?

$SQL1 = "UPDATE table SET status='".$status."' WHERE email='".$client['email']."'";

I am getting error: Unexpected input field parameter in database query.

here is the full code

$server1 = "localhost";
$user_name1 = "DBUSER";
$passworda2 = "2HGfn5D480#";
$database2 = "DBNAME";
$db_handle1 = mysql_connect($server1, $user_name1, $passworda2);
$db_found = mysql_select_db($database2, $db_handle1);
if ($db_found) {
$status = "6";

$SQL1 = "UPDATE table SET status=".$status." WHERE email='".$client['email']."'";

$result = mysql_query($SQL1);
mysql_close($db_handle1);
}
else {
print "Database NOT Found ";
mysql_close($db_handle1);
}

回答1:


seems the couse of the error was

mysql_close($db_handle1);

took me 4 hours to figure that out ! :D



来源:https://stackoverflow.com/questions/21174435/mysql-update-unexpected-input-field-parameter-in-database-query

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!