diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 310ac659f0640a7ed304211817548ca918cf420c..c4cf0a24a999cbc3b557e09713e3335863037bc7 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -585,7 +585,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;