Skip to content

Commit

Permalink
Update Builder.php
Browse files Browse the repository at this point in the history
  • Loading branch information
pjsde authored Sep 19, 2019
1 parent 3affcc1 commit 3a0133a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions system/Database/MySQLi/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,23 @@ class Builder extends BaseBuilder
*/
protected $escapeChar = '`';

/**
* FROM tables
*
* Groups tables in FROM clauses if needed, so there is no confusion
* about operator precedence.
*
* Note: This is only used (and overridden) by MySQL.
*
* @return string
*/
protected function _fromTables(): string
{
if ( ! empty($this->QBJoin) && count($this->QBFrom) > 1)
{
return '('.implode(', ', $this->QBFrom).')';
}

return implode(', ', $this->QBFrom);
}
}

0 comments on commit 3a0133a

Please sign in to comment.