From d7310fc27f9ddf770b35271055e7215943e7a071 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 6 Oct 2009 10:27:12 +0200 Subject: [PATCH] Ein Query in SL/CA auf DBUTils umgestellt. --- SL/CA.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/SL/CA.pm b/SL/CA.pm index 0dae72e48..a537085c9 100644 --- a/SL/CA.pm +++ b/SL/CA.pm @@ -60,13 +60,10 @@ sub all_accounts { qq|WHERE c.id = a.chart_id | . qq|$acc_cash_where| . qq|GROUP BY c.accno|; - my $sth = $dbh->prepare($query); - $sth->execute || $form->dberror($query); - while (my $ref = $sth->fetchrow_hashref(NAME_lc)) { + foreach my $ref (selectall_hashref_query($form, $dbh, $query)) { $amount{ $ref->{accno} } = $ref->{amount}; } - $sth->finish; my $where = "AND c.id = $chart_id" if ($chart_id ne ''); -- 2.20.1