Skip to content

Commit

Permalink
fixed delete method returning false
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmancuso committed Sep 15, 2017
1 parent 1bd62fc commit 2c7223d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ public function createUpdateQuery()
}

}
$this->id = $id;
return $prepared_query;
}

Expand Down Expand Up @@ -934,6 +935,8 @@ public function delete($where_clause = false)
$where_clause = "id = '$this->id'";
} elseif (isset($where_clause) && is_numeric($where_clause)) {
$where_clause = "id = '$where_clause'";
} elseif(isset($where_clause) && is_string($where_clause)) {
//
} else {
return false;
}
Expand Down

0 comments on commit 2c7223d

Please sign in to comment.