You are here

public function DataTable::disown in Data 6

Same name and namespace in other branches
  1. 7 includes/DataTable.inc \DataTable::disown()

Remove a table from Data module's management, ie unadopt it.

Uses the $name property of the object to determine which database table to adopt.

Return value

TRUE if the table was successfully disowned; FALSE if the query failed, or if Schema isn't available.

File

includes/DataTable.inc, line 173
Contains class definition for DataTable.

Class

DataTable
Manages data access and manipulation for a single data table. Use data_create_table() or data_get_table() to instantiate an object from this class.

Code

public function disown() {
  $table = array(
    $this->name,
  );
  return db_query("DELETE FROM {data_tables} WHERE name IN (" . db_placeholders($table, 'varchar') . ");", $table);
}