Skip to content

Commit d0620ac

Browse files
committed
#7 - Fix WHERE clause problem
1 parent 4b5428a commit d0620ac

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/TgDatabase/DAO.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ public function delete($object) {
200200
*/
201201
public function deleteBy($criteria = array()) {
202202
$whereClause = $this->createWhereClause($criteria);
203-
$query = 'DELETE FROM '.$this->database->quoteName($this->tableName).' '.$whereClause;
204-
return $this->database->query($query);
203+
return $this->database->delete($this->tableName, substr($whereClause, 6));
205204
}
206205

207206
/**

0 commit comments

Comments
 (0)