Commit 5f3d601b by Ivan Pomortsev

Update Query.php

Change passing parameters to array with two elements – 'all' which means if we use UNION or UNION ALL construction and 'query' which is our sql query that will be at right of construction.
parent 8109708b
...@@ -640,8 +640,7 @@ class Query extends Component implements QueryInterface ...@@ -640,8 +640,7 @@ class Query extends Component implements QueryInterface
*/ */
public function union($sql, $all = false) public function union($sql, $all = false)
{ {
$sql->addParams([ 'all' => $all ]); $this->union[] = array( 'query' => $sql, 'all' => $all );
$this->union[] = $sql;
return $this; return $this;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment