You are here

function biblio_delete_keyword in Bibliography Module 6.2

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

Delete a keyword from both the biblio_keyword and biblio_keyword_data tables This will remove the keyword referenced by the supplied ID from ALL nodes which reference them.

Parameters

integer $keyword_id: The keyword ID to delete.

Return value

integer The number of keywords deleted (should always be one).

3 calls to biblio_delete_keyword()
BiblioKeywordUnitTest::testBiblioDeleteKeyword in tests/keyword.test
biblio_admin_keyword_delete_confirm_submit in includes/biblio.admin.inc
biblio_delete_multiple_keywords in includes/biblio.keywords.inc
Delete multiple keywords from both the biblio_keyword and biblio_keyword_data tables This will remove the keywords referenced by the supplied ID's from ALL nodes which reference them.

File

includes/biblio.keywords.inc, line 300
Keywords related functions for Drupal biblio module.

Code

function biblio_delete_keyword($keyword_id) {
  db_query('DELETE FROM {biblio_keyword} WHERE kid = %d', $keyword_id);
  db_query('DELETE FROM {biblio_keyword_data} WHERE kid = %d', $keyword_id);
  return db_affected_rows();
}