$update_customer = "UPDATE Customers SET email = ?, accepts_marketing = ?, created_at = ?, updated_at = ?, first_name = ?, last_name = ?, orders_count = ?, state = ?, total_spent = ?, last_order_id = ?, last_order_name = ? WHERE id = ? LIMIT 1) ";
if ($stmt_customers = mysqli_prepare($sql_connect, $update_customer)) {
mysqli_stmt_bind_param($stmt_customers, "sissssissssi", $json_array1[$i]['customer']['email'],
$json_array1[$i]['customer']['accepts_marketing'],
$json_array1[$i]['customer']['created_at'],
$json_array1[$i]['customer']['updated_at'],
$json_array1[$i]['customer']['first_name'],
$json_array1[$i]['customer']['last_name'],
$json_array1[$i]['customer']['orders_count'],
$json_array1[$i]['customer']['state'],
$json_array1[$i]['customer']['total_spent'],
$json_array1[$i]['customer']['last_order_id'],
$json_array1[$i]['customer']['last_order_name'],
$json_array1[$i]['customer']['id']
);
mysqli_stmt_execute($stmt_customers);
} else {
// $insert_customer prepare error
Echo "fail test";
echo mysqli_stmt_error($stmt_customers);
die();
}
Can anyone spot the error here?