You are here

function biblio_get_keyword_by_id in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 includes/biblio.keywords.inc \biblio_get_keyword_by_id()
  2. 6 biblio.keywords.inc \biblio_get_keyword_by_id()
  3. 7.2 includes/biblio.keywords.inc \biblio_get_keyword_by_id()

Parameters

$kid:

2 calls to biblio_get_keyword_by_id()
BiblioKeywordWebTestCase::testBiblioGetKeywordById in tests/BiblioKeywordWebTestCase.test
_biblio_filter_info_line in includes/biblio.pages.inc

File

includes/biblio.keywords.inc, line 51
Contains all keyword related functions.

Code

function biblio_get_keyword_by_id($kid) {
  static $keywords = array();
  if (!isset($keywords[$kid])) {
    $keywords[$kid] = db_query('SELECT * FROM {biblio_keyword_data} WHERE kid = :kid', array(
      ':kid' => $kid,
    ))
      ->fetchObject();
  }
  return $keywords[$kid];
}