diff --git a/helper.php b/helper.php index 51458c23..892fac8c 100644 --- a/helper.php +++ b/helper.php @@ -168,7 +168,7 @@ function validate($name = '', $layer = 'validate', $appendSuffix = false) * 实例化数据库类 * @param string $name 操作的数据表名称(不含前缀) * @param array|string $config 数据库配置参数 - * @return \think\db\Connection + * @return \think\db\Query */ function db($name = '', $config = []) { diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 7610c9c7..fa191827 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -18,8 +18,8 @@ use think\Config; use think\Db; use think\db\Builder; use think\db\Connection; -use think\db\DbException; use think\Exception; +use think\exception\DbException; use think\exception\PDOException; use think\db\exception\BindParamException; use think\db\exception\ModelNotFoundException;