function variable_del

7.x bootstrap.inc variable_del($name)
6.x bootstrap.inc variable_del($name)

Unsets a persistent variable.

Case-sensitivity of the variable_* functions depends on the database collation used. To avoid problems, always use lower case for persistent variable names.

Parameters

$name: The name of the variable to undefine.

See also

variable_get(), variable_set()

34 calls to variable_del()
aggregator_uninstall in drupal-6.x/modules/aggregator/aggregator.install
Implementation of hook_uninstall().
color_scheme_form_submit in drupal-6.x/modules/color/color.module
Submit handler for color change form.
comment_node_type in drupal-6.x/modules/comment/comment.module
Implementation of hook_node_type().
comment_update_6002 in drupal-6.x/modules/comment/comment.install
Changed comment settings from global to per-node -- copy global settings to all node types.
contact_uninstall in drupal-6.x/modules/contact/contact.install
Implementation of hook_uninstall().

... See full list

File

drupal-6.x/includes/bootstrap.inc, line 634
Functions that need to be loaded on every Drupal request.

Code

function variable_del($name) {
  global $conf;

  db_query("DELETE FROM {variable} WHERE name = '%s'", $name);
  cache_clear_all('variables', 'cache');

  unset($conf[$name]);
}