summaryrefslogtreecommitdiffstats
path: root/editkeywords.cgi
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-03-16 09:27:14 +0100
committermkanat%kerio.com <>2005-03-16 09:27:14 +0100
commitb99cbd1d893ff0a730ab7187f409bcdf3c6f4aeb (patch)
treeb2769bdde9c44eefd7834dcbc18e67e66d6d1aa9 /editkeywords.cgi
parent94dcd5edee079a1bb67a0011711d25a4be0f14c6 (diff)
downloadbugzilla-b99cbd1d893ff0a730ab7187f409bcdf3c6f4aeb.tar.gz
bugzilla-b99cbd1d893ff0a730ab7187f409bcdf3c6f4aeb.tar.xz
Bug 174295: ANSI SQL requires all columns in SELECT to be in GROUP BY, unless they are in "aggregate" functions
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=joel, a=myk
Diffstat (limited to 'editkeywords.cgi')
-rwxr-xr-xeditkeywords.cgi7
1 files changed, 5 insertions, 2 deletions
diff --git a/editkeywords.cgi b/editkeywords.cgi
index f5fcf6a57..8ad74710e 100755
--- a/editkeywords.cgi
+++ b/editkeywords.cgi
@@ -30,6 +30,7 @@ use Bugzilla::Config qw(:DEFAULT $datadir);
use Bugzilla::User;
my $cgi = Bugzilla->cgi;
+my $dbh = Bugzilla->dbh;
use vars qw($template $vars);
@@ -70,8 +71,10 @@ if ($action eq "") {
SendSQL("SELECT keyworddefs.id, keyworddefs.name, keyworddefs.description,
COUNT(keywords.bug_id)
- FROM keyworddefs LEFT JOIN keywords ON keyworddefs.id = keywords.keywordid
- GROUP BY keyworddefs.id
+ FROM keyworddefs LEFT JOIN keywords
+ ON keyworddefs.id = keywords.keywordid " .
+ $dbh->sql_group_by('keyworddefs.id',
+ 'keyworddefs.name, keyworddefs.description') . "
ORDER BY keyworddefs.name");
while (MoreSQLData()) {