尝试使用MySQLi更新记录时出现以下错误
"警告:mysqli_stmt_bind_param()要求参数1为mysqli_stmt,布尔值在"
中给出请在此处查看我的代码:
$query_task_update = "update tasks set (display_order) = (?) where task_id '".$last_task_id."'";
$stmt_task_update = mysqli_prepare($dbc, $query_task_update);
mysqli_stmt_bind_param($stmt_task_update, "i", $display_order);
mysqli_stmt_execute($stmt_task_update);
答案 0 :(得分:1)
$query_task_update = "update tasks set display_order=? where task_id=?";
$stmt_task_update = mysqli_prepare($dbc, $query_task_update);
mysqli_stmt_bind_param($stmt_task_update, "ii", $display_order, $last_task_id);
mysqli_stmt_execute($stmt_task_update);