Re: Possible Problem with bind_param

2006-11-15 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > Basically, it was the same code, but I just added the type parameter > to the bind_param call: ... > Just out of curiosity, what would "$dbh->{pg_server_prepare} = 0" do? It forces the placeholders to get prepared by DBD::Pg, and not by Postgres i

Re: Possible Problem with bind_param

2006-11-13 Thread David Wu
Hi Greg, Basically, it was the same code, but I just added the type parameter to the bind_param call: 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

RE: Possible Problem with bind_param

2006-11-12 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Philip Garrett: > FWIW, I tested a simple "SELECT ?" with your '[EMAIL PROTECTED]' > value against my Postgres 7.2 (DBD::Pg 1.21). It bound fine and > returned the correct value. Yikes! Please update both of those right away - they are severely old

RE: Possible Problem with bind_param

2006-11-10 Thread Garrett, Philip \(MAN-Corporate\)
FWIW, I tested a simple "SELECT ?" with your '[EMAIL PROTECTED]' value against my Postgres 7.2 (DBD::Pg 1.21). It bound fine and returned the correct value. David Wu wrote: > Hi Brian, > > Thanks for the suggestion. I thought that might be the case as well, > and I've already tried adding the

Re: Possible Problem with bind_param

2006-11-10 Thread David Wu
Hi Brian, Thanks for the suggestion. I thought that might be the case as well, and I've already tried adding the type attribute as a varchar, but there was no change. Dave On Nov 10, 2006, at 4:31 PM, CAMPBELL, BRIAN D (BRIAN) wrote: Here's a guess, as I'm not familiar with your particul

Re: Possible Problem with bind_param

2006-11-10 Thread David Wu
Hi Philip, Yes, $dbh->{RaiseError} is set to 1. I have the code surrounded in an eval that does a rollback if there is an error, or a commit if there is no error. The code is committing and the query is being executed, just not with the value I expect. Thanks, Dave On Nov 10, 2006, at

RE: Possible Problem with bind_param

2006-11-10 Thread CAMPBELL, BRIAN D (BRIAN)
Here's a guess, as I'm not familiar with your particular Database and DBD. It looks like the DBD is treating your value as in integer. Perhaps the DBD looks at the first part of the string, and thinks, "here's a number, so I'll pass an integer type to the database engine". Suggestion: try addi

RE: Possible Problem with bind_param

2006-11-10 Thread Garrett, Philip \(MAN-Corporate\)
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 >