PG error in group by
git-svn-id: svn://10.0.0.236/trunk@228707 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1303,7 +1303,12 @@ sub init {
|
||||
push(@groupby, $field) if !grep($_ eq $field, @groupby);
|
||||
}
|
||||
}
|
||||
$query .= " " . $dbh->sql_group_by("test_${obj}s.${obj}_id", join(', ', @groupby));
|
||||
if (scalar @groupby){
|
||||
$query .= " " . $dbh->sql_group_by("test_${obj}s.${obj}_id", join(', ', @groupby));
|
||||
}
|
||||
else {
|
||||
$query .= " " . $dbh->sql_group_by("test_${obj}s.${obj}_id");
|
||||
}
|
||||
|
||||
|
||||
if (@having) {
|
||||
|
||||
Reference in New Issue
Block a user