Skip to content

Commit 542aa5d

Browse files
committed
delete method bug fix !!!
1 parent e91b87f commit 542aa5d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/model/Model.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,12 @@ public function delete($data)
224224
$this->data['conditions'] = $data;
225225

226226
$sql = "DELETE FROM {$this->table} ".self::where();
227+
$this->stmt = $this->conn->prepare($sql);
227228

228229
if ( ! empty($this->where)) {
229230
self::param();
230231
}
231232

232-
$this->stmt = $this->conn->prepare($sql);
233-
234233
$this->stmt->execute();
235234
$this->count = $this->stmt->rowCount();
236235
}

0 commit comments

Comments
 (0)