summaryrefslogtreecommitdiffstats
path: root/list-unvisitied-nodes.php
diff options
context:
space:
mode:
authorKyle Kaminski <kyle@xenomedia.com>2014-07-17 16:03:41 -0500
committerKyle Kaminski <kyle@xenomedia.com>2014-07-17 16:03:41 -0500
commitad84363810fa5cd1a72b54d7cb1658571183d01e (patch)
tree9d2eab87a24ca559d84b971e5bcf6cc16eb34772 /list-unvisitied-nodes.php
parente4d376db088d296dfb34b58e8b557c38107b17c8 (diff)
downloaddrupal-quest-ad84363810fa5cd1a72b54d7cb1658571183d01e.tar.gz
drupal-quest-ad84363810fa5cd1a72b54d7cb1658571183d01e.tar.bz2
drupal-quest-ad84363810fa5cd1a72b54d7cb1658571183d01e.zip
drupal_mail testHEADmaster
Diffstat (limited to 'list-unvisitied-nodes.php')
-rw-r--r--list-unvisitied-nodes.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/list-unvisitied-nodes.php b/list-unvisitied-nodes.php
new file mode 100644
index 0000000..41294d7
--- /dev/null
+++ b/list-unvisitied-nodes.php
@@ -0,0 +1,18 @@
+<?php
+
+define('DRUPAL_ROOT', getcwd());
+
+include_once DRUPAL_ROOT . '/includes/bootstrap.inc';
+drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);
+
+$query = db_select('og_membership', 'og')
+ ->fields('og', array('etid'))
+ ->where("og.entity_type = 'node' AND `field_name` = 'blog_ref' AND og.etid NOT IN (SELECT `entity_id` FROM {flagging} WHERE `fid` = :fid AND `uid` = :uid) AND og.etid IN (SELECT `etid` FROM {og_membership} WHERE `gid` = :gid AND `entity_type` = 'node')", array(':fid' => 3, ':uid' => 1, ':gid' => 192));
+$result = $query->execute();
+
+$i = 0;
+foreach ($result as $record) {
+ print $record->etid . PHP_EOL;
+ $i++;
+}
+print $i;