$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();
SELECT name, email FROM customers UNION ( SELECT name, email FROM suppliers) UNION ( SELECT name, email FROM shareholders)
SELECT name, email FROM customers
Joomla 4
MySQL version 5.6.38
Tested with Joomla 3.8.7 with expected result.
Labels |
Added:
?
|
Title |
|
Category | ⇒ | SQL |
Status | New | ⇒ | Information Required |
Worked beautifully, thank you.
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-05-02 11:03:52 |
Closed_By | ⇒ | simbunch |
Please mark as successful tested on the framework/database repo
How do I do that?
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
.
can you have a look at joomla-framework/database#116 ?