You are here

function patterns_db_remove_pattern in Patterns 7.2

Same name and namespace in other branches
  1. 7 includes/db.inc \patterns_db_remove_pattern()

Remove permanently a pattern from the database.

Parameters

mixed $pid: The id of the pattern to remove.

Return value

bool TRUE on success, FALSE otherwise.

2 calls to patterns_db_remove_pattern()
patterns_examples_disable in patterns_examples/patterns_examples.install
Implements hook_uninstall().
patterns_io_remove_pattern in includes/io/io.inc
Removes a pattern both from the file system and the database.

File

includes/db.inc, line 121
Retrieve, save, and remove patterns from the database.

Code

function patterns_db_remove_pattern($pid) {
  $del = db_delete('patterns')
    ->condition('pid', $pid)
    ->execute();
  return $del == 1 ? TRUE : FALSE;
}