version: 2.1.12
drop
Drop a table.
drop($table)
table [string]
The table name.
Return: [PDOStatement] The PDOStatement object.
Basic
This API is only for dropping a table. It's convenient when the table prefix is set. For dropping databases, schema, event, index, or other database resources, use exec()
to execute raw commands instead.
$database->drop("account");
DROP TABLE IF EXISTS account
$database = new Medoo([ ... "prefix" => "WP_" ]); $database->drop("account");
DROP TABLE IF EXISTS WP_account