[rt.cpan.org #36395]
- From: bug-DBI@xxxxxxxxxxx (Tim_Bunce via RT)
- Date: Tue, 01 Jul 2008 06:07:04 -0400
Queue: DBI
Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=36395 >
On Tue Jul 01 01:37:00 2008, RTHANGAM wrote:
On Tue Jun 24 17:17:23 2008, TIMB wrote:
The DBI is acting as defined. It's not a bug.
You should avoid using an array to pass arguments to execute().
I could still see the following examples mentioned in the documentation
in CPAN where we are passing an array to execute method(). Please
comment on this.
$rv = $sth->execute or die $sth->errstr;
$rv = $sth->execute(@bind_values) or die $sth->errstr;
I was too terse in my reply. If you use an array to pass arguments to execute() you should
take care that the number of elements in the array matches the number of placeholders.
I've added a note to the docs:
Note that passing C<execute> an empty array is the same as passing no arguments
at all, which will execute the statement with previously bound values.
That's probably not what you want.
Tim.
.
- References:
- [rt.cpan.org #36395]
- From: Ramesh Thangamani via RT
- [rt.cpan.org #36395]
- Prev by Date: avoiding array argument passing to execute
- Next by Date: Re: Out of memory error with DBI - DBD::Oracle
- Previous by thread: Re: [rt.cpan.org #36395]
- Next by thread: Re: [rt.cpan.org #36696] DBI AutoCommit perldebug eval $@ problem
- Index(es):
Relevant Pages
|