function _hashtags_index_is_exists in Hashtags 7
Check if index exists
Parameters
int $entity_id :
string $type:
int $tid :
int $comment_id :
Return value
boolean
File
- ./
hashtags.module, line 604
Code
function _hashtags_index_is_exists($entity_id, $type, $tid, $comment_id = NULL) {
$count = db_query('SELECT COUNT(*)
FROM {hashtags_index}
WHERE entity_id = :entity_id
AND type = :type
AND tid = :tid
AND comment_id = :comment_id', array(
':entity_id' => $entity_id,
':type' => $type,
':tid' => $tid,
':comment_id' => $comment_id,
))
->fetchField();
return $count ? TRUE : FALSE;
}