@@ -644,12 +644,15 @@ |
||
644 | 644 | if (is_string($tableName) && $tableName = $this->getRawTableName($tableName)) { |
645 | 645 | if (strpos($tableName, 'SELECT') !== false) { |
646 | 646 | $toSql[] = '(' . $this->quoteSql($tableName) . ')'; |
647 | - } else { |
|
647 | + } |
|
648 | + else { |
|
648 | 649 | $toSql[] = $this->quoteTableName($tableName); |
649 | 650 | } |
650 | - } else if ($tableName instanceof QueryBuilder) { |
|
651 | + } |
|
652 | + else if ($tableName instanceof QueryBuilder) { |
|
651 | 653 | $toSql[] = '(' . $this->quoteSql($tableName->toSQL()) . ')'; |
652 | - } else { |
|
654 | + } |
|
655 | + else { |
|
653 | 656 | throw new QBException('Incorrect table name'); |
654 | 657 | } |
655 | 658 |