Skip to content

Commit

Permalink
Call group function in toString method
Browse files Browse the repository at this point in the history
We need to call the group function one more time in the the toString method to make sure we  capture all select fields and table joins
  • Loading branch information
williamsandy committed Sep 5, 2016
1 parent 945a1a7 commit ad636a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libraries/joomla/database/query/sqlsrv.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ class JDatabaseQuerySqlsrv extends JDatabaseQuery implements JDatabaseQueryLimit
*/
public function __toString()
{
// Call the group function one final time to ensure we can get all coulumns for table joins.
if ($this->group)
{
$this->group($this->group->getElements());
}

$query = '';

switch ($this->type)
Expand Down

0 comments on commit ad636a1

Please sign in to comment.