Commit e57e17db authored by webchick's avatar webchick

Issue #2060821 by legolasbo: Remove Unused local variable from...

Issue #2060821 by legolasbo: Remove Unused local variable  from /core/lib/Drupal/Core/Database/Query/Select.php.
parent 76218456
......@@ -629,7 +629,7 @@ protected function prepareCountQuery() {
// Also remove 'all_fields' statements, which are expanded into tablename.*
// when the query is executed.
foreach ($count->tables as $alias => &$table) {
foreach ($count->tables as &$table) {
unset($table['all_fields']);
}
}
......@@ -683,12 +683,12 @@ public function __toString() {
$fields[] = $this->connection->escapeTable($alias) . '.*';
}
}
foreach ($this->fields as $alias => $field) {
foreach ($this->fields as $field) {
// Always use the AS keyword for field aliases, as some
// databases require it (e.g., PostgreSQL).
$fields[] = (isset($field['table']) ? $this->connection->escapeTable($field['table']) . '.' : '') . $this->connection->escapeField($field['field']) . ' AS ' . $this->connection->escapeAlias($field['alias']);
}
foreach ($this->expressions as $alias => $expression) {
foreach ($this->expressions as $expression) {
$fields[] = $expression['expression'] . ' AS ' . $this->connection->escapeAlias($expression['alias']);
}
$query .= implode(', ', $fields);
......@@ -696,7 +696,7 @@ public function __toString() {
// FROM - We presume all queries have a FROM, as any query that doesn't won't need the query builder anyway.
$query .= "\nFROM ";
foreach ($this->tables as $alias => $table) {
foreach ($this->tables as $table) {
$query .= "\n";
if (isset($table['join type'])) {
$query .= $table['join type'] . ' JOIN ';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment