aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/metadata.php
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-18 10:53:58 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-18 10:53:58 +0000
commit231dd799e9fefdac3328ee2ee4e64fb2889e03cc (patch)
treee7974e3ec2e0667ca06a48f30ad861585599adee /engine/lib/metadata.php
parent83d27eab014164d5988e6b16eaf5822f73218abb (diff)
downloadelgg-231dd799e9fefdac3328ee2ee4e64fb2889e03cc.tar.gz
elgg-231dd799e9fefdac3328ee2ee4e64fb2889e03cc.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Moved order and limit the right way git-svn-id: https://code.elgg.org/elgg/trunk@245 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/metadata.php')
-rw-r--r--engine/lib/metadata.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 6ef104dbb..3d5eb7c35 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -310,14 +310,14 @@
if ($meta_name!="")
$where[] = "m.name='$meta_name'";
if ($meta_value!="")
- $where[] = "m.value='$meta_value'";
+ $where[] = "m.value_id='$meta_value'";
$query = "SELECT * from {$CONFIG->dbprefix}entities e JOIN {$CONFIG->dbprefix}metadata m on e.guid = m.entity_guid where";
foreach ($where as $w)
$query .= " $w and ";
$query .= " (e.access_id in {$access} or (e.access_id = 0 and e.owner_guid = {$_SESSION['id']}))"; // Add access controls
- $query .= " order by $order_by limit $offset,$limit"; // Add order and limit
-
+ $query .= " order by $order_by limit $limit, $offset"; // Add order and limit
+ echo $query;
return get_data($query, "entity_row_to_elggstar");
}