public function DataTable::disown in Data 7
Same name and namespace in other branches
- 6 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 183 - 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() {
if (!module_exists('schema')) {
return FALSE;
}
$num_deleted = db_delete('data_tables')
->condition('name', $this->name)
->execute();
return $num_deleted == 1;
}