问题:
在config/database.php 增加一个其他数据库连接后,怎么在控制器中使用呢?
答案:
我记得生成好像有
回复迅睿框架创始人
按文档
\Phpcmf\Service::M()->db
是不是这样呢?
\Phpcmf\Service::M("otherdbname")->db
https://codeigniter4.github.io/userguide/database/connecting.html
https://codeigniter4.github.io/userguide/database/connecting.html
https://www.xunruicms.com/doc/857.html