File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -291,10 +291,16 @@ private function getFullName(string $table): string
291291
292292 if ($ this ->db ->escapeChar === '" ' ) {
293293 if (str_contains ($ table , '. ' )) {
294- $ dbInfo = explode ('. ' , $ table );
295- $ database = str_replace ('" ' , '' , $ dbInfo [0 ]);
296- $ schema = str_replace ('" ' , '' , $ dbInfo [1 ]);
297- $ tableName = str_replace ('" ' , '' , $ dbInfo [2 ]);
294+ $ dbInfo = explode ('. ' , $ table );
295+ $ database = $ this ->db ->getDatabase ();
296+ $ schema = $ this ->db ->schema ;
297+ $ table = $ dbInfo [0 ];
298+
299+ if (isset ($ dbInfo [1 ], $ dbInfo [2 ])) {
300+ $ database = str_replace ('" ' , '' , $ dbInfo [0 ]);
301+ $ schema = str_replace ('" ' , '' , $ dbInfo [1 ]);
302+ $ tableName = str_replace ('" ' , '' , $ dbInfo [2 ]);
303+ }
298304
299305 return '" ' . $ database . '"." ' . $ schema . '"." ' . str_replace ('" ' , '' , $ tableName ) . '" ' . $ alias ;
300306 }
You can’t perform that action at this time.
0 commit comments