hesco has asked for the wisdom of the Perl Monks concerning the following question:
My code looks like this:
My logs report:sub _get_billing_plan_options { my $self = shift; my @billing_plan_options; my $sql = $self->{'cfg'}->param("sql.get_svc_plan_options"); $self->log('DEBUG','->_get_billing_plan_options() says our query is: + ' . $sql); my $sth = $self->{'dbh'}->prepare($sql); $self->log('DEBUG','Our $sth is: ',$sth); while (my $options = $sth->fetchrow_hashref()){ $options->{'plan_type'} =~ s/_/ /; push @billing_plan_options, [ 'service_plan_' . $options->{'svc_pl +an_id'}, $options->{'plan_name'}, $options->{'plan_type'} ]; push @billing_plan_options, [ 'service_plan_prepay_' . $options->{ +'svc_plan_id'}, $options->{'plan_name'}, $options->{'plan_type'} ]; } return \@billing_plan_options; }
Any pointers would be appreciated.DEBUG: ->_get_billing_plan_options() says our query is: SELECT svc_pla +n_id, plan_name, plan_type FROM svc_plans WHERE plan_active ORDER BY +plan_type, plan_sort_order DEBUG: Our $sth is: $VAR1 = bless( {}, 'DBI::st' ); Uncaught exception from user code: DBD::Pg::st fetchrow_hashref failed: no statement executing
-- Hugh
UPDATE:
Yes, of course. Perhaps I should have taken the evening off instead of trying to code on a Sunday evening. A bit of rest might help me avoid overlooking the obvious. Thank you, jrsimmon, for the second set of eyes on this. I guess next time I will recognize that unfamiliar error message.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Baffled by "fetchrow_hashref failed: no statement executing"
by jrsimmon (Hermit) on Jul 06, 2009 at 00:50 UTC |