You are here

function word_link_exchange_get_count_taxonomy_terms in Word Link 7

Same name and namespace in other branches
  1. 8 modules/word_link_exchange/word_link_exchange.module \word_link_exchange_get_count_taxonomy_terms()
  2. 7.2 modules/word_link_exchange/word_link_exchange.module \word_link_exchange_get_count_taxonomy_terms()

Get count of taxonomy terms from DB.

Parameters

int $vid: Vocabulary id.

Return value

int Return count of terms.

1 call to word_link_exchange_get_count_taxonomy_terms()
word_link_exchange_import_from_taxonomy in modules/word_link_exchange/word_link_exchange.module
Import links from taxonomy terms to DB.

File

modules/word_link_exchange/word_link_exchange.module, line 347
Code for the Word link exchange module.

Code

function word_link_exchange_get_count_taxonomy_terms($vid) {
  $query = db_select('taxonomy_term_data', 't');
  $query
    ->condition('t.vid', $vid, '=');
  $result = $query
    ->countQuery()
    ->execute()
    ->fetchField();
  return $result;
}