Mysqli_stmt_bind_param cannot handle the time type?
This statement of error
Mysqli_stmt_bind_param ($stmt, ' idii ', $c, $a, $t, $w);
Full code
Require (' inc/config.php ');
$page _title = ' Residential Data add-feige data center ';
Include (' inc/header.php ');
Require (MYSQL);
if ($_server[' request_method '] = = ' POST ') {
$trimmed = Array_map (' Trim ', $_post);
$errors = Array ();
if (Empty ($trimmed [' wdate '])) {
$errors [] = ' date cannot be empty ';
} else {
$w = mysqli_real_escape_string ($conn, $trimmed [' wdate ']);
}
if (Isset ($trimmed [' City ']) && Filter_var ($trimmed ["City"], Filter_validate_int, Array (' city ' = 1)) {
$c = mysqli_real_escape_string ($conn, $trimmed [' City ']);;
} else {
$errors [] = ' Please select region ';
}
if (Is_numeric ($trimmed [' Taoshu ']) && ($trimmed [' Taoshu '] > 0)} {
$t = Mysqli_real_escape_string ($conn, (int) $trimmed [' Taoshu ']);
} else {
$errors [] = ' Please enter the correct units ';
}
if (Is_numeric ($trimmed [' area ']) && ($trimmed [' area '] > 0)} {
$a = mysqli_real_escape_string ($conn, (float) $trimmed [' area '];
} else {
$errors [] = ' Please enter a correct area ';
}
if (empty ($errors)) {
$q = ' INSERT into F_chengjiao (city_id, area, Taoshu, Fang_time, Os_time) VALUES (?,?,?,?,?, Now ()) ';
$stmt = Mysqli_prepare ($conn, $q);
Mysqli_stmt_bind_param ($stmt, ' idii ', $c, $a, $t, $w);
Mysqli_stmt_execute ($stmt);
if (mysqli_stmt_affected_rows ($stmt) = = 1) {
Echo 'This data has been added
';
$_post = Array ();
} else {
Echo 'The program has an error, please re-add
';
}
Mysqli_stmt_close ($stmt);
}
}
if (!empty ($errors) && Is_array ($errors)) {
Echo 'The following error occurred:
';
foreach ($errors as $msg) {
echo "-$msg
\ n ";
}
Echo ' Please try it again
';
}
?>
Home Data Additions
Include (' inc/footer.php ');
?>
Error notification
Error file is ' D:\wamp\www\zhuzhai_add.php ' error line number is 36:mysqli_stmt_bind_param () expects parameter 1 to be mysqli_stmt, Boolean give N