function _hashtags_index_get_tags_count in Hashtags 7
Return number of same tags that attached to current entity (only one can be attached for entity, and by one for each comment)
Parameters
int $entity_id id of entity:
string $type:
int $tid id of hashtag:
Return value
int number of tags
1 call to _hashtags_index_get_tags_count()
- _hashtags_index_remove in ./
hashtags.module - Remove hashtag index from database
File
- ./
hashtags.module, line 631
Code
function _hashtags_index_get_tags_count($entity_id, $type, $tid) {
$count = db_query('SELECT COUNT(*)
FROM {hashtags_index}
WHERE entity_id = :entity_id
AND type = :type
AND tid = :tid', array(
':entity_id' => $entity_id,
':type' => $type,
':tid' => $tid,
))
->fetchField();
return $count;
}