RE: Possible Problem with bind_param
- From: Philip.Garrett@xxxxxxxxxxx (Philip Garrett)
- Date: Fri, 10 Nov 2006 19:21:13 -0500
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
.
- Follow-Ups:
- Re: Possible Problem with bind_param
- From: David Wu
- Re: Possible Problem with bind_param
- Prev by Date: Possible Problem with bind_param
- Next by Date: RE: Possible Problem with bind_param
- Previous by thread: Possible Problem with bind_param
- Next by thread: Re: Possible Problem with bind_param
- Index(es):
Relevant Pages
|