Skip Menu |

This queue is for tickets about the SQL-Interp CPAN distribution.

Report information
The Basics
Id: 42733
Status: resolved
Priority: 0/
Queue: SQL-Interp

People
Owner: Nobody in particular
Requestors: metaperl [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.06
Fixed in: (no value)



Re: http://search.cpan.org/~markstos/SQL-Interp-1.06/lib/SQL/Interp.pm#Preparing_and_reusing_a_statement_handle We read: my $sth; for my $href (@array_of_hashrefs) { my @list = ('SELECT * FROM mytable WHERE', $href); my ($sql, @bind) = sql_interp @list; if (! defined $sth || $sth->{Statement} ne $sql) { $sth = $dbh->prepare($sql); } $sth->execute(@list); ###### <------ SAY WHAT?!!!!! $sth->fetchall_arrayref(); } but the ->execute() should be against @bind not @list
Subject: Re: [rt.cpan.org #42733]
Date: Fri, 23 Jan 2009 15:15:49 -0500
To: bug-SQL-Interp [...] rt.cpan.org
From: Mark Stosberg <mark [...] summersault.com>
Show quoted text
> Re: > http://search.cpan.org/~markstos/SQL-Interp-1.06/lib/SQL/Interp.pm#Preparing_and_reusing_a_statement_handle > > We read: > > my $sth; > for my $href (@array_of_hashrefs) { > my @list = ('SELECT * FROM mytable WHERE', $href); > my ($sql, @bind) = sql_interp @list; > if (! defined $sth || $sth->{Statement} ne $sql) { > $sth = $dbh->prepare($sql); > } > $sth->execute(@list); ###### <------ SAY WHAT?!!!!! > $sth->fetchall_arrayref(); > } > > but the ->execute() should be against @bind not @list
Thanks, Terrence. I'll repair it, with credit to you. Mark
Subject: thanks
Your other SQL::Interp typo report is soon to be released as a fix.