mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
改进Query类的getTableInfo方法 支持对表名的特殊字符定义
This commit is contained in:
@@ -1202,10 +1202,14 @@ class Query
|
|||||||
if (is_array($tableName)) {
|
if (is_array($tableName)) {
|
||||||
$tableName = key($tableName) ?: current($tableName);
|
$tableName = key($tableName) ?: current($tableName);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strpos($tableName, ',')) {
|
if (strpos($tableName, ',')) {
|
||||||
// 多表不获取字段信息
|
// 多表不获取字段信息
|
||||||
return false;
|
return false;
|
||||||
|
} else {
|
||||||
|
$tableName = $this->connection->parseSqlTable($tableName);
|
||||||
}
|
}
|
||||||
|
|
||||||
$guid = md5($tableName);
|
$guid = md5($tableName);
|
||||||
if (!isset($_info[$guid])) {
|
if (!isset($_info[$guid])) {
|
||||||
$info = $this->connection->getFields($tableName);
|
$info = $this->connection->getFields($tableName);
|
||||||
|
|||||||
Reference in New Issue
Block a user