You are here

function nodejs_subscribe_is_node_subscribed_to in Node.js integration 6

Same name and namespace in other branches
  1. 7 nodejs_subscribe/nodejs_subscribe.module \nodejs_subscribe_is_node_subscribed_to()

Check to see if anyone is subscribed to this node.

Parameters

mixed $nid :

Return value

boolean

4 calls to nodejs_subscribe_is_node_subscribed_to()
nodejs_subscribe_comment_insert in nodejs_subscribe/nodejs_subscribe.module
Implements hook_comment_insert().
nodejs_subscribe_nodeapi in nodejs_subscribe/nodejs_subscribe.module
Implements hook_nodeapi().
nodejs_subscribe_node_delete in nodejs_subscribe/nodejs_subscribe.module
Implements hook_node_delete().
nodejs_subscribe_node_update in nodejs_subscribe/nodejs_subscribe.module
Implements hook_node_update().

File

nodejs_subscribe/nodejs_subscribe.module, line 150

Code

function nodejs_subscribe_is_node_subscribed_to($nid) {
  return db_query('SELECT COUNT(*) subscription_count FROM {nodejs_subscribe_subscription} WHERE nid = %d', $nid);
}