+ [misc] add another part of getTables.

This commit is contained in:
宋辰轩
2024-06-19 13:56:18 +08:00
committed by 綦新志
parent f71e88860f
commit ec361d42b1
+19
View File
@@ -69,6 +69,25 @@ class biModel extends model
}
}
}
if($statement->join)
{
foreach($statement->join as $joinInfo)
{
if($joinInfo->expr->table)
{
$tables[] = $joinInfo->expr->table;
}
elseif($deep && $joinInfo->expr->subquery)
{
$parser = new sqlparser($joinInfo->expr->expr);
$subTables = $this->getTables($parser->statements[0], true);
$tables = array_merge($tables, $subTables);
}
}
}
return array_filter(array_unique($tables));
}
/**