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.

Reply via email to