Re: Warnings from Ima::DBI
[prev]
[thread]
[next]
[Date index for 2004/06/23]
On Wed, Jun 23, 2004 at 10:21:25AM -0400, William McKee wrote:
> Hi Tony,
>
> Sorry for all these messages coming at you; lots of CDBI work happening
> at the office.
>
> I've got a set_sql statement that contains a complex join with a single
> placeholder. I decided to use the example you gave last week of calling
> sql_queryname to get a statement handle in a select trigger as follows:
>
> sub trigger__select {
> my $class = shift;
> my $sth = $class->sql_total_amount;
> $sth->execute($class->id);
> my $hashref = $sth->fetchrow_hashref();
> $class->total_amount($hashref->{'total_amount'});
> }
>
> When I go to use this class, I get repeated entries of the following
> message:
>
> prepare_cached(
> <my sql statement here>
> ) statement handle DBIx::ContextualFetch::st=HASH(0x922c99c) still active at /usr/local/lib/perl5/site_perl/5.8.3/Ima/DBI.pm line 391
I think you may just need to call $sth->finish() before you leave your
subroutine - though I may be misunderstanding the problem.
Colm
|
|
Re: Warnings from Ima::DBI
colm-cdbi 14:32 on 23 Jun 2004
|