From 420200475b9893755adec774d04024d01a84afac Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 1 Oct 2008 11:05:49 +0000 Subject: Closes #379 git-svn-id: https://code.elgg.org/elgg/trunk@2159 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/metadata.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/lib') 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.* "; } -- cgit v1.2.3