更新代码,适配php7.4
This commit is contained in:
@@ -1813,11 +1813,10 @@ abstract class Connection
|
||||
* @access public
|
||||
* @return integer
|
||||
*/
|
||||
public function getExecuteTimes()
|
||||
public function getExecuteTimes()
|
||||
{
|
||||
return Db::$executeTimes;
|
||||
return json(['times' => Db::$executeTimes]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭数据库(或者重新连接)
|
||||
* @access public
|
||||
|
||||
@@ -565,7 +565,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;
|
||||
|
||||
Reference in New Issue
Block a user