使用DMZ DataMapper连接到多个数据库 [英] Connecting to mulitple databases with DMZ DataMapper

查看:113
本文介绍了使用DMZ DataMapper连接到多个数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为CodeIgniter使用DMZ DataMapper ORM。

I'm using the DMZ DataMapper ORM for CodeIgniter.

我确定可以将其配置为连接到多个数据库。我还没有找到任何文档。有没有人这样做?

I'm sure it is possible to configure it to connect to multiple databases. I haven't found any documentation yet. Has anyone done this before?

推荐答案

解决方案很简单:

在database.php中创建另一个数据库配置并添加

Create another database configuration in database.php and add

var $db_params = 'name_of_other_database';

这篇关于使用DMZ DataMapper连接到多个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆