summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-28 18:49:51 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-28 18:49:51 +0000
commitfbd6ffbf52fad02951b3f37fd3bf1341f3670830 (patch)
tree2e98cefa3005f1d871fbcf24ee866d665dd8bf35 /includes
parentc719b1a5b332ea1051b612c5f8ffb99e789f4589 (diff)
downloadbrdo-fbd6ffbf52fad02951b3f37fd3bf1341f3670830.tar.gz
brdo-fbd6ffbf52fad02951b3f37fd3bf1341f3670830.tar.bz2
#1005674 by solotandem: Fixed SelectQuery::countQuery() fails with a group by expression
Diffstat (limited to 'includes')
-rw-r--r--includes/database/select.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/database/select.inc b/includes/database/select.inc
index 9046afbdf..7f44063a2 100644
--- a/includes/database/select.inc
+++ b/includes/database/select.inc
@@ -1354,7 +1354,7 @@ class SelectQuery extends Query implements SelectQueryInterface {
}
public function groupBy($field) {
- $this->group[] = $field;
+ $this->group[$field] = $field;
return $this;
}
@@ -1362,7 +1362,7 @@ class SelectQuery extends Query implements SelectQueryInterface {
// Create our new query object that we will mutate into a count query.
$count = clone($this);
- $group_by = drupal_map_assoc(array_values($count->getGroupBy()));
+ $group_by = $count->getGroupBy();
if (!$count->distinct) {
// When not executing a distinct query, we can zero-out existing fields