diff options
author | Dan Ungureanu <udan1107@gmail.com> | 2015-12-17 22:57:04 +0200 |
---|---|---|
committer | Dan Ungureanu <udan1107@gmail.com> | 2015-12-17 22:57:04 +0200 |
commit | 8bbff36381ce22c4fd4cb90d56b517d5c1451a77 (patch) | |
tree | 4be8225cf2d6645c1d86ce024354ab8a747f662c /src/Components/UnionKeyword.php | |
parent | 7d64afacbeb598886435bb9e25f0f395d19aee00 (diff) | |
download | sql-parser-8bbff36381ce22c4fd4cb90d56b517d5c1451a77.zip sql-parser-8bbff36381ce22c4fd4cb90d56b517d5c1451a77.tar.gz sql-parser-8bbff36381ce22c4fd4cb90d56b517d5c1451a77.tar.bz2 |
Added UNION ALL as a type of UNION.
Diffstat (limited to 'src/Components/UnionKeyword.php')
-rw-r--r-- | src/Components/UnionKeyword.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Components/UnionKeyword.php b/src/Components/UnionKeyword.php index d1a1ef5..6286cd0 100644 --- a/src/Components/UnionKeyword.php +++ b/src/Components/UnionKeyword.php @@ -31,6 +31,10 @@ class UnionKeyword extends Component */ public static function build($component, array $options = array()) { - return implode(' UNION ', $component); + $tmp = array(); + foreach ($component as $component) { + $tmp[] = $component[0] . ' ' . $component[1]; + } + return implode(' ', $tmp); } } |