You are here

function hashtags_get_terms_by_names in Hashtags 6

Same name and namespace in other branches
  1. 7 hashtags.module \hashtags_get_terms_by_names()
1 call to hashtags_get_terms_by_names()
hashtags_filter in ./hashtags.module
Implementation of hook_filter().

File

./hashtags.module, line 185

Code

function hashtags_get_terms_by_names($names) {
  $terms = array();
  $vid = variable_get('hashtags_vocabulary', '');
  $sql = "SELECT td.name, td.tid FROM {term_data} td   \n  WHERE lower(td.name) IN (" . $names . ") AND td.vid = %d";
  $result = db_query($sql, $vid);
  while ($term = db_fetch_object($result)) {
    $terms[$term->name] = $term->tid;
  }
  return $terms;
}