Version: v2.4.0
drop
Drop an existing table.
drop($table)
table [string]
The name of the table to drop.
Return Value
[PDOStatement] The PDOStatement instance for the executed query.
Basic
This API drops tables only. It is especially convenient when a table prefix is configured. To drop databases, schemas, events, indexes, or other resources, use
exec() with raw SQL.$database->drop("account");
DROP TABLE IF EXISTS account
$database = new Medoo([
// ... other options
"prefix" => "WP_"
]);
$database->drop("account");
DROP TABLE IF EXISTS WP_account