Medoo

开始

更新日志

Where 语句

查询

聚合

Fetch

事务

原生SQL查询

Raw object

PDO object

Debug

数据库信息

delete

删除表中的数据

delete($table, $where)
Return: [PDOStatement]返回 PDOStatement对象
一个比较危险的操作,操作前请考虑好。。。
$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