public function union($sql, $all = false)
{
if (is_array($sql)) {
foreach ($sql as $s) {
$this->union .= $all ? ' UNION ALL ' : ' UNION ';
$this->union .= $this->filterUnionSql($s);
}
} else {
$this->union .= $all ? ' UNION ALL ' : ' UNION ';
$this->union .= $this->filterUnionSql($sql) . ' ';
}
return $this;
}