90 |
if ( $group_by ) { |
if ( $group_by ) { |
91 |
@columns = ( "count($group_by)", $group_by ); |
@columns = ( "count($group_by)", $group_by ); |
92 |
my $g; |
my $g; |
93 |
foreach my $c ( @where_parts, param('order_by'), $group_by ) { |
foreach my $c ( @where_parts, $group_by ) { |
94 |
$c =~ s/\s.+$//; |
$c =~ s/\s.+$//; |
95 |
$g->{$c}++ if length($c) > 0; |
$g->{$c}++ if length($c) > 0; |
96 |
} |
} |
99 |
param('where_value',''); |
param('where_value',''); |
100 |
param('group_by', $group_by); |
param('group_by', $group_by); |
101 |
param('columns', [ @columns ], [ @columns ]); |
param('columns', [ @columns ], [ @columns ]); |
102 |
|
param('order_by', $columns[0] . ' desc'); |
103 |
} else { |
} else { |
104 |
$group_by = param('group_by'); |
$group_by = param('group_by'); |
105 |
} |
} |