This issue has been added to the bug tracker, but it's apparently down right now.
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33691&start=0
$query1 = $db->getQuery(true);
$query2 = $db->getQuery(true);
$query1->select('block');
$query1->from('#__users AS u');
$query1->group('u.id');
$query2->select('user_id');
$query2->from('#__user_usergroup_map AS uum');
$query2->group('uum.user_id');
$query1->union($query2);
echo $query1->dump();
return $query1;
SELECT block
FROM kscr_users AS u
GROUP BY u.id
UNION
( SELECT user_id
FROM kscr_user_usergroup_map AS uum
GROUP BY uum.user_id)
Syntax error check manual for correct syntax near GROUP BY u.id
SELECT block
FROM kscr_users AS u
UNION
( SELECT user_id
FROM kscr_user_usergroup_map AS uum
GROUP BY uum.user_id)
GROUP BY u.id
PHP Built On Linux ds2.sbthosting.com 2.6.18-348.3.1.el5PAE #1 SMP Mon Mar 11 20:30:57 EDT 2013 i686
Database Version 5.1.73-cll
Database Collation utf8_general_ci
PHP Version 5.3.28
Web Server Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/0.9.8i mod_bwlimited/1.4
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 3.3.0 Stable [ Ember ] 30-April-2014 14:00 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
union is so close, but so far away
Description | <h4>Steps to reproduce the issue</h4> <p>$query1 = $db->getQuery(true);<br> $query2 = $db->getQuery(true);</p> <p>$query1->select('block');<br> $query1->from('#__users AS u');<br> $query1->group('u.id');</p> <p>$query2->select('user_id');<br> $query2->from('#__user_usergroup_map AS uum');<br> $query2->group('uum.user_id');</p> <p>$query1->union($query2);<br> echo $query1->dump();<br> return $query1;</p> <h4>Expected result</h4> <p>SELECT block <br> FROM kscr_users AS u<br> GROUP BY u.id <br> UNION <br> ( SELECT user_id <br> FROM kscr_user_usergroup_map AS uum <br> GROUP BY uum.user_id) </p> <h4>Actual result</h4> <p>Syntax error check manual for correct syntax near GROUP BY u.id</p> <p>SELECT block <br> FROM kscr_users AS u <br> UNION <br> ( SELECT user_id <br> FROM kscr_user_usergroup_map AS uum <br> GROUP BY uum.user_id) <br> GROUP BY u.id</p> <h4>System information (as much as possible)</h4> <p>PHP Built On Linux ds2.sbthosting.com 2.6.18-348.3.1.el5PAE <a href="https://github.com/joomla/joomla-cms/pull/1" class="issue-link" title="Test">#1</a> SMP Mon Mar 11 20:30:57 EDT 2013 i686<br> Database Version 5.1.73-cll<br> Database Collation utf8_general_ci<br> PHP Version 5.3.28<br> Web Server Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/0.9.8i mod_bwlimited/1.4<br> WebServer to PHP Interface cgi-fcgi<br> Joomla! Version Joomla! 3.3.0 Stable [ Ember ] 30-April-2014 14:00 GMT<br> Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT</p> <h4>Additional comments</h4> <p>union is so close, but so far away</p> | ⇒ | <p>This issue has been added to the bug tracker, but it's apparently down right now.<br><a href="http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33691&start=0">http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33691&start=0</a></p> <h4>Steps to reproduce the issue</h4> <p>$query1 = $db->getQuery(true);<br> $query2 = $db->getQuery(true);</p> <p>$query1->select('block');<br> $query1->from('#__users AS u');<br> $query1->group('u.id');</p> <p>$query2->select('user_id');<br> $query2->from('#__user_usergroup_map AS uum');<br> $query2->group('uum.user_id');</p> <p>$query1->union($query2);<br> echo $query1->dump();<br> return $query1;</p> <h4>Expected result</h4> <p>SELECT block <br> FROM kscr_users AS u<br> GROUP BY u.id <br> UNION <br> ( SELECT user_id <br> FROM kscr_user_usergroup_map AS uum <br> GROUP BY uum.user_id) </p> <h4>Actual result</h4> <p>Syntax error check manual for correct syntax near GROUP BY u.id</p> <p>SELECT block <br> FROM kscr_users AS u <br> UNION <br> ( SELECT user_id <br> FROM kscr_user_usergroup_map AS uum <br> GROUP BY uum.user_id) <br> GROUP BY u.id</p> <h4>System information (as much as possible)</h4> <p>PHP Built On Linux ds2.sbthosting.com 2.6.18-348.3.1.el5PAE <a href="https://github.com/joomla/joomla-cms/pull/1" class="issue-link" title="Test">#1</a> SMP Mon Mar 11 20:30:57 EDT 2013 i686<br> Database Version 5.1.73-cll<br> Database Collation utf8_general_ci<br> PHP Version 5.3.28<br> Web Server Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/0.9.8i mod_bwlimited/1.4<br> WebServer to PHP Interface cgi-fcgi<br> Joomla! Version Joomla! 3.3.0 Stable [ Ember ] 30-April-2014 14:00 GMT<br> Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT</p> <h4>Additional comments</h4> <p>union is so close, but so far away</p> |
fixed here: #3687
You may blame the J!Tracker Application for transmitting this comment.
I am closing this as it has been fixed elsewhere.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-07-28 18:53:48 |
Labels |
Added:
?
Removed: ? |
I will try to handle this one
You may blame the J!Tracker Application for transmitting this comment.