You are here

function biblio_load_keywords in Bibliography Module 6

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

Load keywords from the database

Parameters

$vid: node version id of the keywords to load

Return value

an array of keywords keyed on the keyword id

1 call to biblio_load_keywords()
biblio_load in ./biblio.module
Implementation of hook_load().

File

./biblio.keywords.inc, line 107

Code

function biblio_load_keywords($vid) {
  $result = db_query('SELECT bkd.* FROM {biblio_keyword} bk INNER JOIN {biblio_keyword_data} bkd ON bk.kid = bkd.kid  WHERE bk.vid = %d ORDER BY bkd.word ASC', $vid);
  $keywords[$vid] = array();
  while ($keyword = db_fetch_object($result)) {
    $keywords[$vid][$keyword->kid] = $keyword->word;
  }
  return $keywords[$vid];
}