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:
ghendricks%novell.com
2007-06-25 19:51:41 +00:00
parent a30970ed36
commit fa17508894

View File

@@ -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) {