Hello,

i'm working on an application with multiple environnement :

ex (files web/environnement_croatia2.php, web/
environnement_belgium3.php, web/environnement_prod.php) :
- $configuration = ProjectConfiguration::getApplicationConfiguration
('environnement', 'croatia2', false);
- $configuration = ProjectConfiguration::getApplicationConfiguration
('environnement', 'belgium3', false);
- $configuration = ProjectConfiguration::getApplicationConfiguration
('administration', 'prod', false);

I need to write information in the environnement/belgium3 database
when i'm working in administration/prod.
I've looked around : public static function getConnection($name =
null, $mode = Propel::CONNECTION_WRITE)

But I can give the environnement in parameter. How can I specify the
connexion name AND the environnement name to accès the other databases
than which ones are in the current environnement ?

Thanks for you support.
David BOUCHÉ.
http://www.willou.net


######### databases.yml :
dev:
  propel:
    param:
      classname:  DebugPDO
  propel_env:
    param:
      classname:  DebugPDO

test:
  propel:
    param:
      classname:  DebugPDO
  propel_env:
    param:
      classname:  DebugPDO

all:
  propel:
    class:        sfPropelDatabase
    param:
      classname:  PropelPDO
      dsn:        mysql:dbname=myproject_admin;host=localhost
      username:   nameuser
      password:   secret
      encoding:   utf8
      persistent: true
      pooling:    true
  propel_env:
    class:        sfPropelDatabase
    param:
      classname:  PropelPDO
      dsn:        mysql:dbname=myproject_env_france;host=localhost
      username:   nameuser
      password:   secret
      encoding:   utf8
      persistent: true
      pooling:    true

austria:
  propel_env:
    class:        sfPropelDatabase
    param:
      classname:  PropelPDO
      dsn:        mysql:dbname=myproject_env_austria;host=localhost
      username:   nameuser
      password:   secret
      encoding:   utf8
      persistent: true
      pooling:    true

belgium:
  propel_env:
    class:        sfPropelDatabase
    param:
      classname:  PropelPDO
      dsn:        mysql:dbname=myproject_env_belgium;host=localhost
      username:   nameuser
      password:   secret
      encoding:   utf8
      persistent: true
      pooling:    true
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to