问题
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