add multiple databases to one app smvc 2.2

General 2 years ago by jstamiosso

I have an application developed with smvc 2.2 running and need to connect multiple databases. It is possible?

1 year ago by daveismyname

I think so you would pass in different credentials when calling the db::get();

public static function get ($group = false) {
// Determining if exists or it's not empty, then use default group defined in config
$group = !$group ? array ( 'type' => DB_TYPE, 'host' => DB_HOST, 'name' => DB_NAME, 'user' => DB_USER, 'pass' => DB_PASS
) : $group;

Login to reply.