From 004a0c8a75e8fb71b8ba0c47f000c381c03a2967 Mon Sep 17 00:00:00 2001 From: marcus Date: Mon, 3 Nov 2008 13:09:42 +0000 Subject: Minor tweaks 'cos case does matter... git-svn-id: https://code.elgg.org/elgg/trunk@2379 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/relationships.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engine/lib/relationships.php') diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php index 8f2d52bbc..f43a46c54 100644 --- a/engine/lib/relationships.php +++ b/engine/lib/relationships.php @@ -380,7 +380,7 @@ $relationship = sanitise_string($relationship); $guid_two = (int)$guid_two; - if ($row = get_data_row("select guid_one from {$CONFIG->dbprefix}entity_relationships where guid_one=$guid_one and relationship='$relationship' and guid_two=$guid_two limit 1")) { + if ($row = get_data_row("SELECT guid_one FROM {$CONFIG->dbprefix}entity_relationships WHERE guid_one=$guid_one AND relationship='$relationship' AND guid_two=$guid_two limit 1")) { return true; } return false; @@ -506,9 +506,9 @@ $joinon = "e.guid = r.guid_two"; if ($count) { - $query = "select count(distinct e.guid) as total "; + $query = "SELECT count(distinct e.guid) as total "; } else { - $query = "select distinct e.* "; + $query = "SELECT distinct e.* "; } $query .= " from {$CONFIG->dbprefix}entity_relationships r JOIN {$CONFIG->dbprefix}entities e on $joinon where "; foreach ($where as $w) -- cgit v1.2.3