Get Started

Upgrade

Where Syntax

Query

Aggregation

Fetch

Transaction

Management

Advanced

Raw object

PDO object

Debug

Information

version: 1.7.3

drop

drop a table

drop($table)
Return: [PDOStatement] The PDOStatement object.

Basic

This API is only for dropping table, convenient when table prefix is in used on the connection. For dropping database, schema, event, index or other database resources, use exec() to execute raw command instead.

$database->drop("account");
// DROP TABLE IF EXISTS account

// ----------------------------------

$database = new Medoo([
	...
	"prefix" => "WP_"
]);

$database->drop("account");
// DROP TABLE IF EXISTS WP_account