Hi, I have a small problem, and I do not know how to solve it.
I want use a several databases mysql in one project, so...
I have such a mysql configuration:
$di->set('db', function() {
$dbCon = array(
'host' => '127.0.0.1',
'username' => 'root',
'password' => 'root'
);
$db = new Mysql($dbCon);
return $db;
});
A "dbname" is not define because I want use several bases in one project and I want define a "dbname" in a model. For example:
use Phalcon\Mvc\Model;
class MyModel extends Model
{
//Database selection
}
...Or maybe You have any idea, how to do.
- Thanks for every help.
- )