in reply to Baffled by "fetchrow_hashref failed: no statement executing"
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); #you have to execute the prepared query! $sth->execute(); 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'} ]; } #Don't forget to finish the statement handle $sth->finish; return \@billing_plan_options; }
|
|---|