Get Started

Upgrade

Where Syntax

Query

Aggregation

Fetch

Transaction

Management

Advanced

Raw object

PDO object

Debug

Information

version: 2.1.7

drop

Drop a table.

drop($table)
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