Skip to content

Commit 11a70bf

Browse files
committed
delete method bug fix
1 parent 2ab45b7 commit 11a70bf

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

core/model/Model.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,16 +219,14 @@ public function create($data)
219219
$this->count = $this->stmt->rowCount();
220220
}
221221

222-
public function delete()
222+
public function delete($data)
223223
{
224+
$this->data['conditions'] = $data;
225+
224226
$sql = "DELETE FROM {$this->table} ".self::where();
225227

226228
$this->stmt = $this->conn->prepare($sql);
227229

228-
if ( ! empty($this->where)) {
229-
self::param();
230-
}
231-
232230
$this->stmt->execute();
233231
$this->count = $this->stmt->rowCount();
234232
}

0 commit comments

Comments
 (0)