diff --git a/library/think/db/Query.php b/library/think/db/Query.php index bb16a1f5..37310f5c 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -397,7 +397,7 @@ class Query $seq = (ord(substr($type($value), 0, 1)) % $rule['num']) + 1; } else { // 按照字段的首字母的值分表 - $seq = (ord($value{0}) % $rule['num']) + 1; + $seq = (ord($value[0]) % $rule['num']) + 1; } } return $this->getTable() . '_' . $seq;