aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/relationships.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-07-11 21:19:14 +0200
committerSem <sembrestels@riseup.net>2012-07-11 21:19:14 +0200
commitb83574ae1b8ada2bb9c2247492806473df920259 (patch)
tree30f9010da3cab12bda4921f079cfe86fcef2e7a4 /engine/lib/relationships.php
parent46bd104bd523c08ff2f6bc0342be9ae1251259e8 (diff)
parent4d42fd0263948eee4a7c7a26ceca0647c01cce32 (diff)
downloadelgg-b83574ae1b8ada2bb9c2247492806473df920259.tar.gz
elgg-b83574ae1b8ada2bb9c2247492806473df920259.tar.bz2
Merge tag '1.8.8' of git://github.com/Elgg/Elgg into lorea-preprod
Elgg 1.8.8 release Conflicts: js/lib/languages.js
Diffstat (limited to 'engine/lib/relationships.php')
-rw-r--r--engine/lib/relationships.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php
index f50c4a485..09d541e22 100644
--- a/engine/lib/relationships.php
+++ b/engine/lib/relationships.php
@@ -239,6 +239,15 @@ function get_entity_relationships($guid, $inverse_relationship = FALSE) {
* Also accepts all options available to elgg_get_entities() and
* elgg_get_entities_from_metadata().
*
+ * To ask for entities that do not have a particulat relationship to an entity,
+ * use a custom where clause like the following:
+ *
+ * $options['wheres'][] = "NOT EXISTS (
+ * SELECT 1 FROM {$db_prefix}entity_relationships
+ * WHERE guid_one = e.guid
+ * AND relationship = '$relationship'
+ * )";
+ *
* @see elgg_get_entities
* @see elgg_get_entities_from_metadata
*