Commit 052332a0 authored by Alex Ne's avatar Alex Ne

+ функция: Удаление записей

parent e2c24452
...@@ -217,6 +217,18 @@ class PDO { ...@@ -217,6 +217,18 @@ class PDO {
return $statement->execute(); return $statement->execute();
} }
/**
* @param $table
* @param $where
*/
public function delete($table, $where) {
$whete_obj = new PDOWhereConstructor($where);
$SQL = "DELETE FROM `{$table}` {$whete_obj->get_sql()}";
$statement = $this->prepare($SQL);
$whete_obj->bind($statement);
return $statement->execute();
}
/** /**
* @param $table * @param $table
* @param array $where * @param array $where
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment