webman对数据库的查询问题

煮酒品天下

当数据表的表名有一个以上的"_"就会报错,无法获取数据
比如:表名im_chat_log,而im_chat却可以获取数据,等待修复

2798 2 0
2个回答

煮酒品天下

获取多数据库数据时报错:

Fatal error: Declaration of support\exception\Handler::render(Webman\Http\Request $request, Throwable $exception): Webman\Http\Response must be compatible with Webman\Exception\ExceptionHandler::render(support\Request $request, Throwable $exception): support\Response in /www/wwwroot/webman.666.cn/support/exception/Handler.php on line 25
Worker[52497] process terminated with ERROR: E_COMPILE_ERROR "Declaration of support\exception\Handler::render(Webman\Http\Request $request, Throwable $exception): Webman\Http\Response must be compatible with Webman\Exception\ExceptionHandler::render(support\Request $request, Throwable $exception): support\Response in /www/wwwroot/webman.666.cn/support/exception/Handler.php on line 25"

有的数据库获取数据就正常,有的数据库就报错

  • 暂无评论
walkor

运行 composer update workerman/webman-framework 更新下

  • 煮酒品天下 2020-06-12

    报错:
    PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'webman_666_c.ims_beta_car_car' doesn't exist in /www/wwwroot/webman.666.cn/vendor/illuminate/database/Connection.php:331
    Stack trace:
    数据库应该是:webman_666_cn,而报错中提示却是webman_666_c,数据库名称读取长度就不对,需要哪里改动

  • 煮酒品天下 2020-06-12

    @6971:数据库应该是weiw_666_cn,可是却提示webman_666_c

  • walkor 2020-06-12

    配置错了吧,你自己找下吧

  • 煮酒品天下 2020-06-12

    @1:正确的了啊,数据表少的数据库没问题,数据表多的数据库就出问题,将数据表多的数据库清空加入少量数据表访问正常,然后增加数据表后就报错了

年代过于久远,无法发表回答
🔝