aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-10-01 11:05:49 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-10-01 11:05:49 +0000
commit420200475b9893755adec774d04024d01a84afac (patch)
tree00b316c1c992bbc898b9ea74f620d9fcceba6c03
parent2141c3b97f04763581b91e6ae16d09e0f803b35c (diff)
downloadelgg-420200475b9893755adec774d04024d01a84afac.tar.gz
elgg-420200475b9893755adec774d04024d01a84afac.tar.bz2
Closes #379
git-svn-id: https://code.elgg.org/elgg/trunk@2159 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/metadata.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 5fe854894..053e6e273 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -517,7 +517,7 @@
if (!$count) {
$query = "SELECT distinct e.* ";
} else {
- $query = "SELECT count(e.guid) as total ";
+ $query = "SELECT count(distinct e.guid) as total ";
}
$query .= "from {$CONFIG->dbprefix}entities e JOIN {$CONFIG->dbprefix}metadata m on e.guid = m.entity_guid where";
@@ -622,7 +622,7 @@
$where[] = "e.container_guid = {$owner_guid}";
if ($count) {
- $query = "SELECT count(e.guid) as total ";
+ $query = "SELECT count(distinct e.guid) as total ";
} else {
$query = "SELECT distinct e.* ";
}