David Wu wrote:
[snip]
> 
> I have some code that automatically tries to update a user's email
> address if it has changed when they come through using an
> integration.  However, it seems that although there was no error with
> the database, the update does not go through.  Here is the code for
> reference:
> 
>              my $sql = "UPDATE m_user SET email = ?, first_name = ?,
> last_name = ? WHERE id = ?;";
>              my $sth = $dbh->prepare($sql);
>              $sth->bind_param(1, $get_vars->{new_email});
>              $sth->bind_param(2, $get_vars->{userfirstname});
>              $sth->bind_param(3, $get_vars->{userlastname});
>              $sth->bind_param(4, $api_user_id);
>              $sth->execute;
>              $sth->finish;

I see you aren't checking for errors.  Is $dbh->{RaiseError} turned on?

Regards,
Philip

Reply via email to