You are here

function _resource_conflict_variable_delete_like in Resource Conflict 6.2

Same name and namespace in other branches
  1. 5.2 resource_conflict.install \_resource_conflict_variable_delete_like()
  2. 7.3 resource_conflict.install \_resource_conflict_variable_delete_like()
  3. 7.2 resource_conflict.install \_resource_conflict_variable_delete_like()

Delete all variables matching a pattern using SQL 'LIKE' syntax.

Parameters

$pattern: The pattern of variables to delete.

1 call to _resource_conflict_variable_delete_like()
resource_conflict_uninstall in ./resource_conflict.install
Implementation of hook_uninstall

File

./resource_conflict.install, line 45

Code

function _resource_conflict_variable_delete_like($pattern) {
  $q = "SELECT name FROM {variable} WHERE name LIKE '%s'";
  $result = db_query($q, $pattern);
  while ($row = db_fetch_array($result)) {
    variable_del($row['name']);
  }
}