function delete($table, $where = array(), $params = array())
{
if (!is_array($where)) {
$where = array($where);
}
if (!is_array($params)) {
$params = array_slice(func_get_args(), 2);
}
$table = $this->rewriteTable($table);
$query = "DELETE FROM " . $this->quoteIdentifier($table);
$query .= $this->getSuffix($where);
$this->onQuery($query, $params);
$statement = $this->prepare($query);
$statement->execute($params);
return $statement;
}