Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
01c89ea3
Commit
01c89ea3
authored
Jan 23, 2014
by
Ivan Pomortsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Query.php
Change union method to accept also <code>$all</code> variable. TRUE means that we must results <code>UNION ALL</code> construction, FALSE – that <code>UNION</code>.
parent
1ea895e2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
Query.php
framework/db/Query.php
+3
-1
No files found.
framework/db/Query.php
View file @
01c89ea3
...
@@ -635,10 +635,12 @@ class Query extends Component implements QueryInterface
...
@@ -635,10 +635,12 @@ class Query extends Component implements QueryInterface
/**
/**
* Appends a SQL statement using UNION operator.
* Appends a SQL statement using UNION operator.
* @param string|Query $sql the SQL statement to be appended using UNION
* @param string|Query $sql the SQL statement to be appended using UNION
* @param bool $all TRUE if using UNION ALL and FALSE if using UNION
* @return static the query object itself
* @return static the query object itself
*/
*/
public
function
union
(
$sql
)
public
function
union
(
$sql
,
$all
=
false
)
{
{
$sql
->
addParams
([
'all'
=>
$all
])
$this
->
union
[]
=
$sql
;
$this
->
union
[]
=
$sql
;
return
$this
;
return
$this
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment