-
-
Save anonymous/3d2e94303de1332022591c68e96b194c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$di->set('db1', function() { | |
return new \Phalcon\Db\Adapter\Pdo\Mysql([ | |
"host" => "localhost", | |
"username" => "", | |
"password" => "", | |
"dbname" => "" | |
]); | |
}); | |
$di->set('db2', function() { | |
return new \Phalcon\Db\Adapter\Pdo\Mysql([ | |
"host" => "localhost", | |
"username" => "", | |
"password" => "", | |
"dbname" => "" | |
]); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function initialize(){ | |
//puedes conectar a la base de datos que desees | |
$this->setConnectionService('db1'); | |
//$this->setConnectionService('db2'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment