?
avatar simbunch
simbunch
1 May 2018

Steps to reproduce the issue

$q1 = $db->getQuery(true)->select('name, email')->from('customers');
$q2 = $db->getQuery(true)->select('name, email')->from('suppliers');
$q3 = $db->getQuery(true)->select('name, email')->from('shareholders');
$q1->union($q2)->union($q3);
echo $q1->__toString();

Expected result

SELECT name, email FROM customers UNION ( SELECT name, email FROM suppliers) UNION ( SELECT name, email FROM shareholders)

Actual result

SELECT name, email FROM customers

System information (as much as possible)

Joomla 4
MySQL version 5.6.38

Additional comments

Tested with Joomla 3.8.7 with expected result.

avatar simbunch simbunch - open - 1 May 2018
avatar joomla-cms-bot joomla-cms-bot - change - 1 May 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 May 2018
avatar simbunch simbunch - change - 1 May 2018
The description was changed
avatar simbunch simbunch - edited - 1 May 2018
avatar joomla-cms-bot joomla-cms-bot - edited - 1 May 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 1 May 2018
Title
Joomla 4 JDatabaseQuery UNION gives unexpected result
[4.0] JDatabaseQuery UNION gives unexpected result
avatar franz-wohlkoenig franz-wohlkoenig - change - 1 May 2018
Category SQL
avatar alikon
alikon - comment - 2 May 2018

can you have a look at joomla-framework/database#116 ?

avatar franz-wohlkoenig franz-wohlkoenig - change - 2 May 2018
Status New Information Required
avatar simbunch
simbunch - comment - 2 May 2018

Worked beautifully, thank you.

avatar simbunch simbunch - change - 2 May 2018
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2018-05-02 11:03:52
Closed_By simbunch
avatar simbunch simbunch - close - 2 May 2018
avatar alikon
alikon - comment - 2 May 2018

Please mark as successful tested on the framework/database repo

avatar simbunch
simbunch - comment - 2 May 2018

How do I do that?

avatar alikon
alikon - comment - 2 May 2018

Just add a comment on that pr that you have tested successfully

Il mer 2 mag 2018, 13:18 simbunch notifications@github.com ha scritto:

How do I do that?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#20276 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AALFsYf5NZdkPaLX2wa9hMHQt-KmEmqXks5tuZYigaJpZM4TuU8m
.

Add a Comment

Login with GitHub to post a comment