initial commit

This commit is contained in:
whale
2020-03-02 16:14:20 +08:00
parent 517082d159
commit 769b87af6a
132 changed files with 5424 additions and 2866 deletions

28
src/ZM/DB/DeleteBody.php Normal file
View File

@@ -0,0 +1,28 @@
<?php
namespace ZM\DB;
class DeleteBody
{
use WhereBody;
/**
* @var Table
*/
private $table;
/**
* DeleteBody constructor.
* @param Table $table
*/
public function __construct(Table $table) {
$this->table = $table;
}
public function save() {
list($sql, $param) = $this->getWhereSQL();
return DB::rawQuery("DELETE FROM " . $this->table->getTableName() . " WHERE " . $sql, $param);
}
}