From cb9063bd313ecc2949fd9190301c7f7fe93d5cab Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 27 Jul 2007 11:45:15 +0000 Subject: [PATCH] Group_BY muss conditional sein --- SL/IC.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SL/IC.pm b/SL/IC.pm index fe666ec14..b615298a7 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -987,7 +987,7 @@ sub all_parts { my $select_clause = join ', ', map { ($table_prefix{$_} || "p.") . $_ } @select_tokens; my $join_clause = join ' ', @joins{ grep $joins_needed{$_}, @join_order }; my $where_clause = join ' AND ', map { "($_)" } @where_tokens; - my $group_clause = ' GROUP BY ' . join ', ', map { ($table_prefix{$_} || "p.") . $_ } @group_tokens; + my $group_clause = ' GROUP BY ' . join ', ', map { ($table_prefix{$_} || "p.") . $_ } @group_tokens if scalar @group_tokens; my $query = qq|SELECT DISTINCT $select_clause FROM parts p $join_clause WHERE $where_clause $group_clause $order_clause $limit_clause|; $form->{parts} = selectall_hashref_query($form, $dbh, $query, @bind_vars); -- 2.20.1