Skip to content

Commit 4ac35c0

Browse files
committed
feat: change the condition.
1 parent d7dd6b4 commit 4ac35c0

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

system/Database/SQLSRV/Builder.php

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -295,18 +295,16 @@ private function getFullName(string $table): string
295295
$database = $this->db->getDatabase();
296296
$table = $dbInfo[0];
297297

298-
if (count($dbInfo) >= 2 && isset($dbInfo[1])) {
299-
if (count($dbInfo) === 3 && isset($dbInfo[2])) {
300-
$database = str_replace('"', '', $dbInfo[0]);
301-
$schema = str_replace('"', '', $dbInfo[1]);
302-
$tableName = str_replace('"', '', $dbInfo[2]);
303-
} else {
304-
$schema = str_replace('"', '', $dbInfo[0]);
305-
$tableName = str_replace('"', '', $dbInfo[1]);
306-
}
307-
308-
return '"' . $database . '"."' . $schema . '"."' . str_replace('"', '', $tableName) . '"' . $alias;
298+
if (count($dbInfo) === 3) {
299+
$database = str_replace('"', '', $dbInfo[0]);
300+
$schema = str_replace('"', '', $dbInfo[1]);
301+
$tableName = str_replace('"', '', $dbInfo[2]);
302+
} else {
303+
$schema = str_replace('"', '', $dbInfo[0]);
304+
$tableName = str_replace('"', '', $dbInfo[1]);
309305
}
306+
307+
return '"' . $database . '"."' . $schema . '"."' . str_replace('"', '', $tableName) . '"' . $alias;
310308
}
311309

312310
return '"' . $this->db->getDatabase() . '"."' . $this->db->schema . '"."' . str_replace('"', '', $table) . '"' . $alias;

0 commit comments

Comments
 (0)