function feeds_get_feed_nid in Feeds 8.2
Same name and namespace in other branches
- 7.2 feeds.module \feeds_get_feed_nid()
Gets the feed_nid for a single entity.
Parameters
int $entity_id: The entity id.
string $entity_type: The type of entity.
Return value
int|bool The feed_nid of the entity, or FALSE if the entity doesn't belong to a feed.
Related topics
2 calls to feeds_get_feed_nid()
- feeds_get_feed_nid_entity_callback in ./
feeds.module - Gets the feed_nid for an entity for use in entity metadata.
- feeds_tokens in ./
feeds.tokens.inc - Implements hook_tokens().
File
- ./
feeds.module, line 499 - Feeds - basic API functions and hook implementations.
Code
function feeds_get_feed_nid($entity_id, $entity_type) {
return db_query("SELECT feed_nid FROM {feeds_item} WHERE entity_type = :type AND entity_id = :id", array(
':type' => $entity_type,
':id' => $entity_id,
))
->fetchField();
}