Skip to content

Commit

Permalink
BaseConnection::newQuery: replaced the name of the temporary table
Browse files Browse the repository at this point in the history
BaseBuilder::from: skip empty table name
  • Loading branch information
iRedds committed Jan 12, 2022
1 parent 1ff5d33 commit 013e374
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions system/Database/BaseBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,11 @@ public function from($from, bool $overwrite = false): self
$this->from(explode(',', $table));
} else {
$table = trim($table);

if ($table === '') {
continue;
}

$this->trackAliases($table);
$this->QBFrom[] = $this->db->protectIdentifiers($table, true, null, false);
}
Expand Down
2 changes: 1 addition & 1 deletion system/Database/BaseConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ public function table($tableName)
*/
public function newQuery(): BaseBuilder
{
return $this->table(uniqid())->from([], true);
return $this->table(',')->from([], true);
}

/**
Expand Down

0 comments on commit 013e374

Please sign in to comment.