0
Inside the Zend Framework 1 Application.ini I have the following configuration:
resources.multidb.sga.adapter = "PDO_MYSQL"
resources.multidb.sga.host = "host.acula.net"
resources.multidb.sga.username = "usuario"
resources.multidb.sga.password = "senha"
resources.multidb.sga.port = "3306"
resources.multidb.sga.dbname = "base"
But I need you to HOST is dynamic. It will be changed as you choose on a Switch in the Controller.
switch ($unidade) {
case 'Gama':
$host = 'sgagama.servidor.br';
$unidade = 5;
$this->realizaConsultaSga($mes, $ano, $unidade);
break;
case 'Sede':
$host = 'sgasede.servidor.br';
$unidade = 1;
$this->realizaConsultaSga($mes, $ano, $unidade);
break;
....
How do I make it work in this idea?
Problem was solved based on this zend link. http://framework.zend.com/manual/1.12/en/zend.config.writer.introduction.html
– phpricardo