mysqli_stmt_prepare failing

                    $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?

Well I’ve been looking at that code for about 40 minutes and couldn’t figure it out.

As soon as I posted the question, I spotted the mistake lol

Can you share your problem/solution with us, just in case anyone runs into anything similar?

Yeah… this happens to me too. I’ll ask someone, and then be like, well… now that I said that out loud, it seems obvious… :smiley:

The end of the statement shouldn’t have a )

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.