protected function getSQLForDelete()
{
extract($this->parts);
$query = 'DELETE FROM ' . $from;
foreach ($join as $j) {
$query .= sprintf(' %s JOIN %s ON %s', strtoupper($j['type']), $j['table'], (string) $j['condition']);
}
if ($where) {
$query .= ' WHERE ' . $where;
}
return $query;
}