[eluser]m4rw3r[/eluser]
I've noticed that db::_delete(), in the db drivers, ignores the $where parameter, and uses $this->ar_where instead.
I use db::_delete() in IgnitedQuery, and I got surprised when I got this query from it: "DELETE FROM `table` WHERE ".
As you can see, it is missing the where part.
In _delete():
Code:
function _delete($table, $where = array(), $like = array(), $limit = FALSE)
{
$conditions = '';
if (count($where) > 0 OR count($like) > 0)
{
$conditions = "\nWHERE ";
$conditions .= implode("\n", $this->ar_where); // here it suddenly ignores $where
...
$where is $this->ar_where when using ActiveRecord, so the bug is only noticed if a 3:rd party lib uses _delete().