RE: Bind variable question
- From: rjk-dbi@xxxxxxxxxxx (Ronald J Kimball)
- Date: Fri, 10 Nov 2006 11:32:05 -0500
Reidy, Ron [mailto:Ron.Reidy@xxxxxxxxxxxxxxxxxx] wrote:
Your statement only has one bind variable (?). The other "bind
variable" is actually a Perl variable. Your execute will fail because
of this.
However, there is another issue. You cannot substitute bind variables
in this manner. Your attempt to dynamically build column names will
fail. You will need to use 'EXECUTE IMMEDIATE' to perform this type of
action.
I think you're misinterpreting his code. He's just building up an SQL
statement in steps. After all the assignments, the value of $sql that's
passed to $dbh->prepare() is:
UPDATE clientcomp SET ccompStreet = ? WHERE ccompid = ?
which is perfectly valid. The only problem I see is that he's passing the
wrong value for the first bind parameter.
Ronald
.
- References:
- RE: Bind variable question
- From: Ron Reidy
- RE: Bind variable question
- Prev by Date: Re: Connect without an entry in TNSNAMES.ORA
- Next by Date: DBI in a web context
- Previous by thread: RE: Bind variable question
- Next by thread: Re: Bind variable question
- Index(es):
Relevant Pages
|
|