Get Started

Upgrade

Where Syntax

Query

Aggregation

Fetch

Transaction

Management

Advanced

Raw object

PDO object

Debug

Information

version: 2.1.12

delete

Delete data from the table.

delete($table, $where)
Return: [PDOStatement] The PDOStatement object.
$database->delete("account", [
	"AND" => [
		"type" => "business",
		"age[<]" => 18
	]
]);

// The return object of delete() is PDOStatement, so you can use its methods to get more information. 
$data = $database->delete("account", [
	"AND" => [
		"type" => "business",
		"age[<]" => 18
	]
]);

// Returns the number of rows affected by the last SQL statement.
echo $data->rowCount();

// Read more: http://php.net/manual/en/class.pdostatement.php