public function SqlBase::drop

8.0.x SqlBase.php public SqlBase::drop($tables)
7.x SqlBase.php public SqlBase::drop($tables)
master SqlBase.php public SqlBase::drop($tables)

Drop specified database.

Parameters

array $tables: An array of table names

Return value

boolean True if successful, FALSE if failed.

1 call to SqlBase::drop()
SqlBase::drop_or_create in lib/Drush/Sql/SqlBase.php
Drop all tables (if DB exists) or CREATE target database.
1 method overrides SqlBase::drop()
Sqlsqlite::drop in lib/Drush/Sql/Sqlsqlite.php
Drop specified database.

File

lib/Drush/Sql/SqlBase.php, line 227

Namespace

Drush\Sql

Class

SqlBase

Code

public function drop($tables) {
  $return = TRUE;
  if ($tables) {
    $sql = 'DROP TABLE ' . implode(', ', $tables);
    $return = $this->query($sql);
  }
  return $return;
}